Struct ami::Vec
[−]
[src]
pub struct Vec<T> { /* fields omitted */ }
A growable array on the heap.
Methods
impl<T> Vec<T>
[src]
fn new() -> Vec<T>
[src]
Create an empty Vec<T>
.
fn with_capacity(size: usize) -> Vec<T>
[src]
Create an empty Vec<T>
.
fn push(&mut self, elem: T)
[src]
Append an element at the end of the Vec<T>
.
fn pop(&mut self) -> Option<T>
[src]
Remove the last element of the Vec<T>
and return it, or None
if
the Vec<T>
is empty.
fn as_ptr(&self) -> *const T
[src]
Get a raw pointer to the Vec<T>
's Buffer.
fn as_slice(&self) -> &[T]
[src]
Get a slice of Vec<T>
's Buffer.
fn as_mut_slice(&self) -> &mut [T]
[src]
Get a slice of Vec<T>
's Buffer.
Trait Implementations
impl<T> Display for Vec<T> where
T: Display,
[src]
T: Display,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Deref for Vec<T>
[src]
type Target = [T]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<T> DerefMut for Vec<T>
[src]
impl<T> Index<usize> for Vec<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.