Skip to main content

IsRandomInsertible

Trait IsRandomInsertible 

Source
pub trait IsRandomInsertible<T>: IsRandomAccessible<T> {
    // Required method
    fn insert(&mut self, index: usize, x: T) -> Result<()>;
}
Expand description

IsRandomInsertible is a trait used for collections of elements which are random insertible

Required Methods§

Source

fn insert(&mut self, index: usize, x: T) -> Result<()>

Should insert an element at the given index

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> IsRandomInsertible<T> for Vec<T>

Source§

fn insert(&mut self, index: usize, x: T) -> Result<()>

Source§

impl<T> IsRandomInsertible<T> for VecDeque<T>

Source§

fn insert(&mut self, index: usize, x: T) -> Result<()>

Implementors§

Source§

impl<P> IsRandomInsertible<P> for PointCloud2D<P>
where P: Is2D,

Source§

impl<P> IsRandomInsertible<P> for PointCloud3D<P>
where P: Is3D,