AnyVecTyped

Struct 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 append<OtherM: MemBuilder>( &mut self, other: &mut AnyVecTyped<'_, T, OtherM>, )

Moves all the elements of other into self, leaving other empty.

§Panics
  • Panics if out of memory.
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, M: MemBuilder> Extend<T> for AnyVecTyped<'a, T, M>

Source§

fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. 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>,

Source§

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>,

Source§

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 Sync + Send> for T
where T: Send + Sync,

Source§

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