pub trait Insert<T>: LenMut + PushBack<T> {
// Required method
fn insert(&mut self, index: usize, val: T) -> Option<Self::PushedOut>;
}Expand description
A trait for moving data to a specific index within a collection.
Unlike Push, insertions must take a linear amount of time and space with respect to the
length of both the collection and the inserted item.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.