insert_many

Trait InsertMany

Source
pub trait InsertMany<T> {
    // Required method
    fn insert_many<I>(&mut self, index: usize, iterable: I)
       where I: IntoIterator<Item = T>,
             I::IntoIter: ExactSizeIterator;
}
Expand description

Generalized trait for inserting many items at once.

Required Methods§

Source

fn insert_many<I>(&mut self, index: usize, iterable: I)
where I: IntoIterator<Item = T>, I::IntoIter: ExactSizeIterator,

Insert all the items in the given iterable at index, shifting all elements after it to the right.

§Panics

This may panic if the ExactSizeIterator implementation is faulty.

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.

Implementations on Foreign Types§

Source§

impl<A: Array> InsertMany<<A as Array>::Item> for SmallVec<A>

Source§

fn insert_many<I>(&mut self, index: usize, iterable: I)
where I: IntoIterator<Item = A::Item>, I::IntoIter: ExactSizeIterator,

Source§

impl<T> InsertMany<T> for Vec<T>

Source§

fn insert_many<I>(&mut self, index: usize, iterable: I)
where I: IntoIterator<Item = T>, I::IntoIter: ExactSizeIterator,

Implementors§