Struct heapless::Vec [] [src]

pub struct Vec<T, A> where
    A: Unsize<[T]>, 
{ /* fields omitted */ }

A Vec, vector, backed by a fixed size array

Methods

impl<T, A> Vec<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Constructs a new, empty Vec<T> backed by the array A

[src]

Returns the maximum number of elements the vector can hold

[src]

Clears the vector, removing all values.

[src]

Removes the last element from a vector and return it, or None if it's empty

[src]

Appends an element to the back of the collection

Returns BufferFullError if the vector is full

[src]

Shortens the vector, keeping the first len elements and dropping the rest.

[src]

Resizes the Vec in-place so that len is equal to new_len.

If new_len is greater than len, the Vec is extended by the difference, with each additional slot filled with value. If new_len is less than len, the Vec is simply truncated.

See also [resize_default].

[src]

Resizes the Vec in-place so that len is equal to new_len.

If new_len is greater than len, the Vec is extended by the difference, with each additional slot filled with Default::default(). If new_len is less than len, the Vec is simply truncated.

See also [resize].

Trait Implementations

impl<T, A> Debug for Vec<T, A> where
    A: Unsize<[T]>,
    T: Debug
[src]

[src]

Formats the value using the given formatter.

impl<T, A> Drop for Vec<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, T, A> IntoIterator for &'a Vec<T, A> where
    A: Unsize<[T]>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a, T, A> IntoIterator for &'a mut Vec<T, A> where
    A: Unsize<[T]>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<T, A, B> PartialEq<Vec<T, B>> for Vec<T, A> where
    A: Unsize<[T]>,
    B: Unsize<[T]>,
    T: PartialEq
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T, A> Eq for Vec<T, A> where
    A: Unsize<[T]>,
    T: Eq
[src]

impl<T, A> Deref for Vec<T, A> where
    A: Unsize<[T]>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T, A> DerefMut for Vec<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Mutably dereferences the value.