Struct any_vec::AnyVecTyped
source · pub struct AnyVecTyped<'a, T: 'static, M: MemBuilder + 'a> { /* private fields */ }
Expand description
Concrete type AnyVec
representation.
Obtained by dereferencing AnyVecRef<T>
or AnyVecMut<T>
.
Operations with concrete type are somewhat faster, due to the fact, that compiler are able to optimize harder with full type knowledge.
Implementations§
source§impl<'a, T: 'static, M: MemBuilder + 'a> AnyVecTyped<'a, T, M>
impl<'a, T: 'static, M: MemBuilder + 'a> AnyVecTyped<'a, T, M>
pub fn reserve(&mut self, additional: usize)where
M::Mem: MemResizable,
pub fn reserve_exact(&mut self, additional: usize)where
M::Mem: MemResizable,
pub fn shrink_to_fit(&mut self)where
M::Mem: MemResizable,
pub fn shrink_to(&mut self, min_capacity: usize)where
M::Mem: MemResizable,
pub unsafe fn set_len(&mut self, new_len: usize)
pub fn insert(&mut self, index: usize, value: T)
pub fn push(&mut self, value: T)
pub fn pop(&mut self) -> Option<T>
pub fn remove(&mut self, index: usize) -> T
pub fn swap_remove(&mut self, index: usize) -> T
pub fn drain( &mut self, range: impl RangeBounds<usize> ) -> impl ElementIterator<Item = T> + 'a
pub fn splice<I>( &mut self, range: impl RangeBounds<usize>, replace_with: I ) -> impl ElementIterator<Item = T> + 'a
pub fn clear(&mut self)
pub fn iter(&self) -> Iter<'a, T>
pub fn iter_mut(&mut self) -> IterMut<'a, T>
pub fn at(&self, index: usize) -> &'a T
pub fn get(&self, index: usize) -> Option<&'a T>
pub unsafe fn get_unchecked(&self, index: usize) -> &'a T
pub fn at_mut(&mut self, index: usize) -> &'a mut T
pub fn get_mut(&mut self, index: usize) -> Option<&'a mut T>
pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &'a mut T
pub fn as_ptr(&self) -> *const T
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_slice(&self) -> &'a [T]
pub fn as_mut_slice(&mut self) -> &'a mut [T]
pub fn spare_capacity_mut(&mut self) -> &'a mut [MaybeUninit<T>]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
Trait Implementations§
source§impl<'a, T: 'static + Debug, M: MemBuilder> Debug for AnyVecTyped<'a, T, M>
impl<'a, T: 'static + Debug, M: MemBuilder> Debug for AnyVecTyped<'a, T, M>
impl<'a, T: 'static + Send, M: MemBuilder + Send> Send for AnyVecTyped<'a, T, M>
impl<'a, T: 'static + Sync, M: MemBuilder + Sync> Sync for AnyVecTyped<'a, T, M>
Auto Trait Implementations§
impl<'a, T, M> Freeze for AnyVecTyped<'a, T, M>
impl<'a, T, M> RefUnwindSafe for AnyVecTyped<'a, T, M>
impl<'a, T, M> Unpin for AnyVecTyped<'a, T, M>
impl<'a, T, M> !UnwindSafe for AnyVecTyped<'a, T, M>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more