Skip to main content

IsPushable

Trait IsPushable 

Source
pub trait IsPushable<T> {
    // Required methods
    fn push(&mut self, x: T);
    fn reserve(&mut self, n: usize);
}
Expand description

IsPushable trait used for collections of elements which can be pushed / appended to

Required Methods§

Source

fn push(&mut self, x: T)

Should push an element to the end of collection

Source

fn reserve(&mut self, n: usize)

Should reserve space for n additional elements, but can be left unimplemented

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

Source§

fn push(&mut self, x: T)

Source§

fn reserve(&mut self, n: usize)

Source§

impl<T> IsPushable<T> for VecDeque<T>

Source§

fn push(&mut self, x: T)

Source§

fn reserve(&mut self, n: usize)

Implementors§

Source§

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

Source§

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

Source§

impl<P> IsPushable<P> for PointCloud3Df32<P>
where P: IsBuildable3D,