std::vec::Drain
pub struct Drain<'a, T, A = Global>
- Kind
- struct
- Module
std::vec- Since
- 1.6.0
Source: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
The entries of std::vec in the Rust reference. This page has 83 cards.
pub struct Drain<'a, T, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn allocator(&self) -> &A
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn as_slice(&self) -> &[T]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn keep_rest(self)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct ExtractIf<'a, T, F, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn allocator(&self) -> &A
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct IntoIter<T, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn allocator(&self) -> &A
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn as_mut_slice(&mut self) -> &mut [T]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn as_slice(&self) -> &[T]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct PeekMut<'a, T, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn pop(this: PeekMut<'a, T, A>) -> T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct Splice<'a, I, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct Vec<T, A = Global>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn allocator(&self) -> &A
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn append(&mut self, other: &mut Vec<T, A>)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_mut_ptr(&mut self) -> *mut T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_mut_slice(&mut self) -> &mut [T]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_non_null(&mut self) -> NonNull<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_ptr(&self) -> *const T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_slice(&self) -> &[T]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn capacity(&self) -> usize
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn clear(&mut self)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn const_make_global(self) -> &'static [T] where T: Freeze
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn dedup(&mut self)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn dedup_by<F>(&mut self, same_bucket: F) where F: FnMut(&mut T, &mut T) -> bool
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn dedup_by_key<F, K>(&mut self, key: F) where F: FnMut(&mut T) -> K, K: PartialEq
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A> where R: RangeBounds<usize>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn extend_from_slice(&mut self, other: &[T])
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn extend_from_within<R>(&mut self, src: R) where R: RangeBounds<usize>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn extract_if<F, R>( &mut self, range: R, filter: F, ) -> ExtractIf<'_, T, F, A> where F: FnMut(&mut T) -> bool, R: RangeBounds<usize>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn from_fn<F>(length: usize, f: F) -> Vec<T> where F: FnMut(usize) -> T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn from_parts( ptr: NonNull<T>, length: usize, capacity: usize, ) -> Vec<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn from_parts_in( ptr: NonNull<T>, length: usize, capacity: usize, alloc: A, ) -> Vec<T, A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub unsafe fn from_raw_parts( ptr: *mut T, length: usize, capacity: usize, ) -> Vec<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn from_raw_parts_in( ptr: *mut T, length: usize, capacity: usize, alloc: A, ) -> Vec<T, A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn insert(&mut self, index: usize, element: T)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn insert_mut(&mut self, index: usize, element: T) -> &mut T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn into_array<const N: usize>(self) -> Result<Box<[T; N], A>, Vec<T, A>>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn into_boxed_slice(self) -> Box<[T], A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn into_chunks<const N: usize>(self) -> Vec<[T; N], A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn into_flattened(self) -> Vec<T, A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_parts(self) -> (NonNull<T>, usize, usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_parts_with_alloc(self) -> (NonNull<T>, usize, usize, A)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn into_raw_parts(self) -> (*mut T, usize, usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn is_empty(&self) -> bool
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn leak<'a>(self) -> &'a mut [T] where A: 'a
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn len(&self) -> usize
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new() -> Vec<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new_in(alloc: A) -> Vec<T, A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn peek_mut(&mut self) -> Option<PeekMut<'_, T, A>>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn pop(&mut self) -> Option<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn pop_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn push(&mut self, value: T)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn push_mut(&mut self, value: T) -> &mut T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn push_within_capacity(&mut self, value: T) -> Result<&mut T, T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn recycle<U>(self) -> Vec<U, A> where U: Recyclable<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn remove(&mut self, index: usize) -> T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn reserve(&mut self, additional: usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn reserve_exact(&mut self, additional: usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn resize(&mut self, new_len: usize, value: T)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn resize_with<F>(&mut self, new_len: usize, f: F) where F: FnMut() -> T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn retain<F>(&mut self, f: F) where F: FnMut(&T) -> bool
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn retain_mut<F>(&mut self, f: F) where F: FnMut(&mut T) -> bool
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub unsafe fn set_len(&mut self, new_len: usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn shrink_to(&mut self, min_capacity: usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn shrink_to_fit(&mut self)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn splice<R, I>( &mut self, range: R, replace_with: I, ) -> Splice<'_, <I as IntoIterator>::IntoIter, A> where R: RangeBounds<usize>, I: IntoIterator<Item = T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn split_off(&mut self, at: usize) -> Vec<T, A> where A: Clone
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn swap_remove(&mut self, index: usize) -> T
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn truncate(&mut self, len: usize)
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_remove(&mut self, index: usize) -> Option<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_shrink_to( &mut self, min_capacity: usize, ) -> Result<(), TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_shrink_to_fit(&mut self) -> Result<(), TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_with_capacity_in( capacity: usize, alloc: A, ) -> Result<Vec<T, A>, TryReserveError>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn with_capacity(capacity: usize) -> Vec<T>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>
std::vecSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.