[][src]Struct array_vec::ArrayVec

pub struct ArrayVec<T, const N: usize> { /* fields omitted */ }

An array backed fixed capcity vector

Methods

impl<T, const N: usize> ArrayVec<T, { N }>[src]

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

The pointer to the start of the array, only valid to read for self.len() elements

This pointer is not valid to write to, use as_mut_ptr instead

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

The pointer to the start of the array, only valid to read for self.len() elements, and to write for N elements

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

As a shared reference to a slice

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

As a unique reference to a slice

pub fn push(&mut self, value: T) -> Result<(), T>[src]

Puts an element onto the end of the ArrayVec

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

Removes the last element from the ArrayVec

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

The length of the ArrayVec

pub fn clear(&mut self)[src]

Removes all elements from the ArrayVec

pub unsafe fn into_array_unchecked(self) -> [T; N][src]

Convert to an array, not checked in release mode and will panic in debug mode

Trait Implementations

impl<T, const N: usize> Drop for ArrayVec<T, { N }>[src]

impl<T, const N: usize> IntoIterator for ArrayVec<T, { N }>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T, { N }>

Which kind of iterator are we turning this into?

impl<T, const N: usize> Extend<T> for ArrayVec<T, { N }>[src]

impl<T, const N: usize> Default for ArrayVec<T, { N }>[src]

Creates a new empty array

impl<T, const N: usize> From<[T; N]> for ArrayVec<T, { N }>[src]

impl<T: Clone, const N: usize> Clone for ArrayVec<T, { N }>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Copy, const N: usize> Clone for ArrayVec<T, { N }>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T, const N: usize> Deref for ArrayVec<T, { N }>[src]

type Target = [T]

The resulting type after dereferencing.

impl<T, const N: usize> DerefMut for ArrayVec<T, { N }>[src]

impl<T, const N: usize> TryInto<[T; N]> for ArrayVec<T, { N }>[src]

type Error = Self

The type returned in the event of a conversion error.

impl<T, const N: usize> FromIterator<T> for ArrayVec<T, { N }>[src]

Auto Trait Implementations

impl<const N: usize, T> Send for ArrayVec<T, N> where
    T: Send

impl<const N: usize, T> Unpin for ArrayVec<T, N> where
    T: Unpin

impl<const N: usize, T> Sync for ArrayVec<T, N> where
    T: Sync

impl<const N: usize, T> UnwindSafe for ArrayVec<T, N> where
    T: UnwindSafe

impl<const N: usize, T> RefUnwindSafe for ArrayVec<T, N> where
    T: RefUnwindSafe

Blanket Implementations

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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