Lines Matching refs:T

98 pub struct Vec<T, A: Allocator> {
99 ptr: NonNull<T>,
104 layout: ArrayLayout<T>,
120 pub type KVec<T> = Vec<T, Kmalloc>;
133 pub type VVec<T> = Vec<T, Vmalloc>;
146 pub type KVVec<T> = Vec<T, KVmalloc>;
149 unsafe impl<T, A> Send for Vec<T, A>
151 T: Send,
157 unsafe impl<T, A> Sync for Vec<T, A>
159 T: Sync,
164 impl<T, A> Vec<T, A>
170 core::mem::size_of::<T>() == 0 in is_zst()
204 pub fn as_slice(&self) -> &[T] { in as_slice() argument
210 pub fn as_mut_slice(&mut self) -> &mut [T] { in as_mut_slice() argument
217 pub fn as_mut_ptr(&mut self) -> *mut T { in as_mut_ptr() argument
224 pub fn as_ptr(&self) -> *const T { in as_ptr() argument
263 pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>] { in spare_capacity_mut() argument
268 let ptr = unsafe { self.as_mut_ptr().add(self.len) } as *mut MaybeUninit<T>; in spare_capacity_mut()
288 pub fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push() argument
367 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts() argument
393 pub fn into_raw_parts(self) -> (*mut T, usize, usize) { in into_raw_parts() argument
460 impl<T: Clone, A: Allocator> Vec<T, A> {
462 pub fn extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> { in extend_with() argument
501 pub fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> { in extend_from_slice() argument
517 pub fn from_elem(value: T, n: usize, flags: Flags) -> Result<Self, AllocError> { in from_elem() argument
526 impl<T, A> Drop for Vec<T, A>
546 impl<T, A, const N: usize> From<Box<[T; N], A>> for Vec<T, A>
550 fn from(b: Box<[T; N], A>) -> Vec<T, A> { in from() argument
564 impl<T> Default for KVec<T> {
571 impl<T: fmt::Debug, A: Allocator> fmt::Debug for Vec<T, A> {
577 impl<T, A> Deref for Vec<T, A>
581 type Target = [T];
584 fn deref(&self) -> &[T] { in deref() argument
591 impl<T, A> DerefMut for Vec<T, A>
596 fn deref_mut(&mut self) -> &mut [T] { in deref_mut() argument
603 impl<T: Eq, A> Eq for Vec<T, A> where A: Allocator {}
605 impl<T, I: SliceIndex<[T]>, A> Index<I> for Vec<T, A>
617 impl<T, I: SliceIndex<[T]>, A> IndexMut<I> for Vec<T, A>
630 impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
632 T: PartialEq<U>,
642 [A1: Allocator, A2: Allocator] Vec<T, A1>, Vec<U, A2>,
643 [A: Allocator] Vec<T, A>, &[U],
644 [A: Allocator] Vec<T, A>, &mut [U],
645 [A: Allocator] &[T], Vec<U, A>,
646 [A: Allocator] &mut [T], Vec<U, A>,
647 [A: Allocator] Vec<T, A>, [U],
648 [A: Allocator] [T], Vec<U, A>,
649 [A: Allocator, const N: usize] Vec<T, A>, [U; N],
650 [A: Allocator, const N: usize] Vec<T, A>, &[U; N],
653 impl<'a, T, A> IntoIterator for &'a Vec<T, A>
657 type Item = &'a T;
658 type IntoIter = slice::Iter<'a, T>;
665 impl<'a, T, A: Allocator> IntoIterator for &'a mut Vec<T, A>
669 type Item = &'a mut T;
670 type IntoIter = slice::IterMut<'a, T>;
690 pub struct IntoIter<T, A: Allocator> {
691 ptr: *mut T,
692 buf: NonNull<T>,
694 layout: ArrayLayout<T>,
698 impl<T, A> IntoIter<T, A>
702 fn into_raw_parts(self) -> (*mut T, NonNull<T>, usize, usize) { in into_raw_parts() argument
746 pub fn collect(self, flags: Flags) -> Vec<T, A> { in collect() argument
764 let layout = unsafe { ArrayLayout::<T>::new_unchecked(len) }; in collect()
793 impl<T, A> Iterator for IntoIter<T, A>
797 type Item = T;
812 fn next(&mut self) -> Option<T> { in next() argument
852 impl<T, A> Drop for IntoIter<T, A>
867 impl<T, A> IntoIterator for Vec<T, A>
871 type Item = T;
872 type IntoIter = IntoIter<T, A>;