Trait binpool::Array
[−]
[src]
pub trait Array { type Item; fn len(&self) -> usize; fn get(&self, ind: usize) -> &Self::Item; fn set(&mut self, ind: usize, val: Self::Item); fn push(&mut self, val: Self::Item); }
Implemented by array types.
Associated Types
type Item
The type of item.
Required Methods
fn len(&self) -> usize
Returns the number of items.
fn get(&self, ind: usize) -> &Self::Item
Get value of item by index.
fn set(&mut self, ind: usize, val: Self::Item)
Set value of item at index.
fn push(&mut self, val: Self::Item)
Push new item at the end of array.
Implementors
impl<T> Array for Vec<T>