[][src]Struct calf_vec::generic::CalfVec

pub struct CalfVec<'a, M: Meta, T, const N: usize> { /* fields omitted */ }

Implementations

impl<'a, M: Meta, T, const N: usize> CalfVec<'a, M, T, N>[src]

pub fn borrowed<B: AsRef<[T]>>(borrowed: &'a B) -> CalfVec<'a, M, T, N>[src]

pub fn owned<O: Into<Vec<T>>>(owned: O) -> CalfVec<'a, M, T, N>[src]

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

pub fn is_owned(&self) -> bool[src]

pub fn is_borrowed(&self) -> bool[src]

pub fn len(&self) -> usize[src]

pub fn capacity(&self) -> Option<usize>[src]

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

impl<'a, M: Meta, T, const N: usize> CalfVec<'a, M, T, N> where
    T: Clone
[src]

pub fn to_mut<'v>(&'v mut self) -> CalfVecMut<'v, 'a, M, T, N>[src]

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

pub fn truncate(&mut self, len: usize)[src]

pub fn reserve(&mut self, additional: usize)[src]

pub fn append(&mut self, other: &mut Vec<T>)[src]

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

Panics

Panics if the number of elements in the vector overflows.

pub fn extend_from_slice(&mut self, other: &[T])[src]

Clones and appends all elements in a slice to the Vec.

Iterates over the slice other, clones each element, and then appends it to this Vec. The other vector is traversed in-order.

Note that this function is same as [extend] except that it is specialized to work with slices instead. If and when Rust gets specialization this function will likely be deprecated (but still available).

pub fn clear(&mut self)[src]

Clears the vector, removing all values.

Note that this method has no effect on the allocated capacity of the vector.

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

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

Removes the last element from a vector and returns it, or None if it is empty.

Trait Implementations

impl<'a, M: Meta, T, const N: usize> Deref for CalfVec<'a, M, T, N>[src]

type Target = [T]

The resulting type after dereferencing.

impl<'a, M: Meta, T, const N: usize> DerefMut for CalfVec<'a, M, T, N>[src]

impl<'a, M: Meta, T, const N: usize> Drop for CalfVec<'a, M, T, N>[src]

impl<'a, M: Meta, T, const N: usize> Extend<T> for CalfVec<'a, M, T, N> where
    T: Clone
[src]

impl<'a, M: Meta + Send, T: Sync, const N: usize> Send for CalfVec<'a, M, T, N>[src]

impl<'a, M: Meta + Sync, T: Sync, const N: usize> Sync for CalfVec<'a, M, T, N>[src]

Auto Trait Implementations

impl<'a, M, T, const N: usize> RefUnwindSafe for CalfVec<'a, M, T, N> where
    M: RefUnwindSafe,
    T: RefUnwindSafe

impl<'a, M, T, const N: usize> Unpin for CalfVec<'a, M, T, N> where
    M: Unpin,
    T: Unpin

impl<'a, M, T, const N: usize> UnwindSafe for CalfVec<'a, M, T, N> where
    M: UnwindSafe,
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.