Lines Matching defs:Vec
33 use crate::vec::Vec;
84 // HACK(japaric) needed for the implementation of `Vec::clone` during testing
97 use crate::vec::Vec;
102 pub fn into_vec<T, A: Allocator>(b: Box<[T], A>) -> Vec<T, A> {
106 Vec::from_raw_parts_in(b as *mut T, len, len, alloc)
112 pub fn to_vec<T: ConvertVec, A: Allocator>(s: &[T], alloc: A) -> Vec<T, A> {
118 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A>
126 default fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> {
128 vec: &'a mut Vec<T, A>,
141 let mut vec = Vec::with_capacity_in(s.len(), alloc);
163 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> {
164 let mut v = Vec::with_capacity_in(s.len(), alloc);
337 /// In the worst case, the algorithm allocates temporary storage in a `Vec<(K, usize)>` the
362 let mut indices: Vec<_> =
400 /// Copies `self` into a new `Vec`.
414 pub fn to_vec(&self) -> Vec<T>
421 /// Copies `self` into a new `Vec` with an allocator.
438 pub fn to_vec_in<A: Allocator>(&self, alloc: A) -> Vec<T, A>
449 /// `Vec<T>`'s `into_boxed_slice` method.
463 pub fn into_vec<A: Allocator>(self: Box<Self, A>) -> Vec<T, A> {
491 pub fn repeat(&self, n: usize) -> Vec<T>
496 return Vec::new();
504 // Using `Vec` to access `set_len()`.
506 let mut buf = Vec::with_capacity(capacity);
619 #[must_use = "this returns the uppercase bytes as a new Vec, \
623 pub fn to_ascii_uppercase(&self) -> Vec<u8> {
640 #[must_use = "this returns the lowercase bytes as a new Vec, \
644 pub fn to_ascii_lowercase(&self) -> Vec<u8> {
674 /// pub struct Foo(Vec<u32>, Vec<String>);
710 type Output = Vec<T>;
712 fn concat(slice: &Self) -> Vec<T> {
714 let mut result = Vec::with_capacity(size);
725 type Output = Vec<T>;
727 fn join(slice: &Self, sep: &T) -> Vec<T> {
734 let mut result = Vec::with_capacity(size);
748 type Output = Vec<T>;
750 fn join(slice: &Self, sep: &[T]) -> Vec<T> {
758 let mut result = Vec::with_capacity(size);
774 impl<T, A: Allocator> Borrow<[T]> for Vec<T, A> {
781 impl<T, A: Allocator> BorrowMut<[T]> for Vec<T, A> {
792 fn clone_into(&self, target: &mut Vec<T, A>);
797 default fn clone_into(&self, target: &mut Vec<T, A>) {
813 fn clone_into(&self, target: &mut Vec<T, A>) {
822 type Owned = Vec<T>;
824 fn to_owned(&self) -> Vec<T> {
829 fn to_owned(&self) -> Vec<T> {
833 fn clone_into(&self, target: &mut Vec<T>) {