[−][src]Struct array_vec::ArrayVec
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T, const N: usize> Extend<T> for ArrayVec<T, { N }>
[src]
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
[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]
default fn clone(&self) -> Self
[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(&self) -> Self
[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]
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.
fn try_into(self) -> Result<[T; N], Self>
[src]
impl<T, const N: usize> FromIterator<T> for ArrayVec<T, { N }>
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
Auto Trait Implementations
impl<const N: usize, T> Send for ArrayVec<T, N> where
T: Send,
T: Send,
impl<const N: usize, T> Unpin for ArrayVec<T, N> where
T: Unpin,
T: Unpin,
impl<const N: usize, T> Sync for ArrayVec<T, N> where
T: Sync,
T: Sync,
impl<const N: usize, T> UnwindSafe for ArrayVec<T, N> where
T: UnwindSafe,
T: UnwindSafe,
impl<const N: usize, T> RefUnwindSafe for ArrayVec<T, N> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,