pub struct ArrayVec<T, const N: usize> { /* private fields */ }Expand description
A fixed-capacity vector.
Implementations§
Source§impl<T, const N: usize> ArrayVec<T, N>
impl<T, const N: usize> ArrayVec<T, N>
Sourcepub fn try_push(&mut self, value: T) -> Result<(), ArrayVecError>
pub fn try_push(&mut self, value: T) -> Result<(), ArrayVecError>
Appends a value, returning an error when the vector is full.
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Returns the stored values as a mutable slice.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
Returns a mutable iterator over the stored values.
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Returns a mutable pointer to the vector’s storage.
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for ArrayVec<T, N>
impl<T, const N: usize> RefUnwindSafe for ArrayVec<T, N>
impl<T, const N: usize> Send for ArrayVec<T, N>
impl<T, const N: usize> Sync for ArrayVec<T, N>
impl<T, const N: usize> Unpin for ArrayVec<T, N>
impl<T, const N: usize> UnsafeUnpin for ArrayVec<T, N>
impl<T, const N: usize> UnwindSafe for ArrayVec<T, N>
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