Struct menoh::Buffer [−][src]
pub struct Buffer<'a, T> where
T: 'a + DtypeCompatible, { /* fields omitted */ }
Buffer, a safe wrapper of menoh buffer control scheme.
It's highly recommended to control buffer content via this instance.
Lifetime of Buffer
instance is bouded by internal data.
Methods
impl<'a, T> Buffer<'a, T> where
T: 'a + DtypeCompatible,
[src]
impl<'a, T> Buffer<'a, T> where
T: 'a + DtypeCompatible,
pub fn new(data: &'a mut [T]) -> Self
[src]
pub fn new(data: &'a mut [T]) -> Self
Create buffer.
data
-data
can't be manipulate whileBuffer
instance lives.
pub fn update(&mut self, data: &[T]) -> Result<(), Error>
[src]
pub fn update(&mut self, data: &[T]) -> Result<(), Error>
Update buffer content from other data.
Data length must be same as internal data length.
pub fn as_slice(&self) -> &[T]
[src]
pub fn as_slice(&self) -> &[T]