pub trait VecDequeInsertionExt<T> {
// Required method
fn insert_many(
&mut self,
index: usize,
values: impl ExactSizeIterator<Item = T>,
);
}
Expand description
Extends VecDeque
with extra insertion routines.
Required Methods§
Sourcefn insert_many(
&mut self,
index: usize,
values: impl ExactSizeIterator<Item = T>,
)
fn insert_many( &mut self, index: usize, values: impl ExactSizeIterator<Item = T>, )
Inserts multiple elements at index
within the deque, shifting all elements
with indices greater than or equal to index
towards the back.
This is O(1) if index
corresponds to either the start or the end of the deque.
Otherwise, this means splitting the deque into two pieces then stitching them back together
at both ends of the added data.
Panics if index
is out of bounds.
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.