Trait push_trait::Insert
[−]
[src]
pub trait Insert<T>: PushBack<T> { fn insert(&mut self, index: usize, val: T) -> Option<Self::PushedOut>; }
A mutable, ordered collection into which items can be inserted at an index.
Unlike a regular Push<T>
implementation, insertions must take amortized O(n + m) time and
O(n + m) space, where m is the length of the pushed item and n is the length of the collection.
Required Methods
fn insert(&mut self, index: usize, val: T) -> Option<Self::PushedOut>
Inserts the value at a position in the collection.