Struct heapless::Vec
[−]
[src]
pub struct Vec<T, A> where
A: AsMut<[T]> + AsRef<[T]>,
T: Copy, { /* fields omitted */ }
A continuous, growable array type
Methods
impl<T, A> Vec<T, A> where
A: AsMut<[T]> + AsRef<[T]>,
T: Copy,
[src]
A: AsMut<[T]> + AsRef<[T]>,
T: Copy,
const fn new(array: A) -> Self
Creates a new vector using array
as the backup storage
fn capacity(&self) -> usize
Returns the capacity of this vector
fn clear(&mut self)
Clears the vector, removing all values
fn pop(&mut self) -> Option<T>
Removes the last element from this vector and returns it, or None
if
it's empty
fn push(&mut self, elem: T) -> Result<(), ()>
Appends an elem
ent to the back of the collection
This method returns Err
if the vector is full
Trait Implementations
impl<T, A> Deref for Vec<T, A> where
A: AsMut<[T]> + AsRef<[T]>,
T: Copy,
[src]
A: AsMut<[T]> + AsRef<[T]>,
T: Copy,