ArrayVec

Type Alias ArrayVec 

Source
pub type ArrayVec<T, const N: usize> = GenericVec<T, [MaybeUninit<T>; N]>;
Expand description

An array backed vector backed by potentially uninitialized memory

Aliased Type§

#[repr(C)]
pub struct ArrayVec<T, const N: usize> { /* private fields */ }

Implementations§

Source§

impl<T, const N: usize> ArrayVec<T, N>

Source

pub fn new() -> Self

Create a new empty ArrayVec

Source

pub fn from_array(array: [T; N]) -> Self

Create a new full ArrayVec

Source

pub fn into_array(self) -> [T; N]

Convert this ArrayVec into an array

§Panics

Panics if the the collection is not full

Source

pub fn try_into_array(self) -> Result<[T; N], Self>

Convert this ArrayVec into an array

§Errors

errors if the the collection is not full

Trait Implementations§

Source§

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

Source§

fn from(array: [T; N]) -> Self

Converts to this type from the input type.