Skip to main content

IsRandomAccessible

Trait IsRandomAccessible 

Source
pub trait IsRandomAccessible<T>: Index<usize, Output = T> + IndexMut<usize> {
    // Required method
    fn len(&self) -> usize;
}
Expand description

IsRandomAccessible is a trait used for collections of elements which are random accessible

Required Methods§

Source

fn len(&self) -> usize

Should return the number of elements within the collection

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> IsRandomAccessible<T> for Vec<T>

Source§

fn len(&self) -> usize

Source§

impl<T> IsRandomAccessible<T> for VecDeque<T>

Source§

fn len(&self) -> usize

Implementors§

Source§

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

Source§

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