[][src]Trait gcode::buffers::Buffer

pub trait Buffer<T> {
    fn try_push(&mut self, item: T) -> Result<(), CapacityError<T>>;
fn as_slice(&self) -> &[T]; }

Something which can store items sequentially in memory. This doesn't necessarily require dynamic memory allocation.

Required methods

fn try_push(&mut self, item: T) -> Result<(), CapacityError<T>>

Try to add another item to this Buffer, returning the item if there is no more room.

fn as_slice(&self) -> &[T]

The items currently stored in the Buffer.

Loading content...

Implementations on Foreign Types

impl<T, A: Array<Item = T>> Buffer<T> for ArrayVec<A>[src]

impl<T> Buffer<T> for Vec<T>[src]

Loading content...

Implementors

Loading content...