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>

source

pub fn reserve(&mut self, additional: usize)
where M::Mem: MemResizable,

source

pub fn reserve_exact(&mut self, additional: usize)
where M::Mem: MemResizable,

source

pub fn shrink_to_fit(&mut self)
where M::Mem: MemResizable,

source

pub fn shrink_to(&mut self, min_capacity: usize)
where M::Mem: MemResizable,

source

pub unsafe fn set_len(&mut self, new_len: usize)

source

pub fn insert(&mut self, index: usize, value: T)

source

pub fn push(&mut self, value: T)

source

pub fn pop(&mut self) -> Option<T>

source

pub fn remove(&mut self, index: usize) -> T

source

pub fn swap_remove(&mut self, index: usize) -> T

source

pub fn drain( &mut self, range: impl RangeBounds<usize> ) -> impl ElementIterator<Item = T> + 'a

source

pub fn splice<I>( &mut self, range: impl RangeBounds<usize>, replace_with: I ) -> impl ElementIterator<Item = T> + 'a
where I: IntoIterator<Item = T>, I::IntoIter: ExactSizeIterator + 'a,

source

pub fn clear(&mut self)

source

pub fn iter(&self) -> Iter<'a, T>

source

pub fn iter_mut(&mut self) -> IterMut<'a, T>

source

pub fn at(&self, index: usize) -> &'a T

source

pub fn get(&self, index: usize) -> Option<&'a T>

source

pub unsafe fn get_unchecked(&self, index: usize) -> &'a T

source

pub fn at_mut(&mut self, index: usize) -> &'a mut T

source

pub fn get_mut(&mut self, index: usize) -> Option<&'a mut T>

source

pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &'a mut T

source

pub fn as_ptr(&self) -> *const T

source

pub fn as_mut_ptr(&mut self) -> *mut T

source

pub fn as_slice(&self) -> &'a [T]

source

pub fn as_mut_slice(&mut self) -> &'a mut [T]

source

pub fn spare_capacity_mut(&mut self) -> &'a mut [MaybeUninit<T>]

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn capacity(&self) -> usize

Trait Implementations§

source§

impl<'a, T: 'static + Debug, M: MemBuilder> Debug for AnyVecTyped<'a, T, M>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: 'static + Send, M: MemBuilder + Send> Send for AnyVecTyped<'a, T, M>
where M::Mem: Send,

source§

impl<'a, T: 'static + Sync, M: MemBuilder + Sync> Sync for AnyVecTyped<'a, T, M>
where M::Mem: Sync,

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SatisfyTraits<dyn None> for T

source§

impl<T> SatisfyTraits<dyn Send> for T
where T: Send,

source§

impl<T> SatisfyTraits<dyn Send + Sync> for T
where T: Send + Sync,

source§

impl<T> SatisfyTraits<dyn Sync> for T
where T: Sync,