pub struct ArrayVec<T, const N: usize> { /* private fields */ }
Expand description
Small on-stack vector of max length N.
Implementations§
Source§impl<T, const N: usize> ArrayVec<T, N>
impl<T, const N: usize> ArrayVec<T, N>
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the number of elements in the vector, also referred to as its ‘length’.
Sourcepub unsafe fn push(&mut self, item: T)
pub unsafe fn push(&mut self, item: T)
Appends an element to the back of a collection.
§Safety
The following must be true:
- The length of this vector is less than
N
.
Sourcepub unsafe fn into_inner(self) -> [MaybeUninit<T>; N]
pub unsafe fn into_inner(self) -> [MaybeUninit<T>; N]
Returns the inner data without dropping its elements.
§Safety
The caller is responsible for calling the destructor for
len
initialized items in the returned array.
Trait Implementations§
Source§impl<T, const N: usize> IntoIterator for ArrayVec<T, N>
impl<T, const N: usize> IntoIterator for ArrayVec<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for ArrayVec<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for ArrayVec<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for ArrayVec<T, N>where
T: Send,
impl<T, const N: usize> Sync for ArrayVec<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for ArrayVec<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for ArrayVec<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)