[][src]Trait magnetic::buffer::Buffer

pub trait Buffer<T> {
    pub fn size(&self) -> usize;
pub fn at(&self, idx: usize) -> *const T;
pub fn at_mut(&mut self, idx: usize) -> *mut T; }

All buffers must implement this trait to be used with any of the queues.

Required methods

pub fn size(&self) -> usize[src]

Return the size of the buffer

pub fn at(&self, idx: usize) -> *const T[src]

Return a pointer to data at the given index. It is expected that this function use modular arithmetic since idx may refer to a location beyond the end of the buffer.

pub fn at_mut(&mut self, idx: usize) -> *mut T[src]

Return a mutable pointer to data at the given index. It is expected that this function use modular arithmetic since idx may refer to a location beyond the end of the buffer.

Loading content...

Implementors

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

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

Loading content...