pub trait FrameBufferConv<T: Supported>: FrameBuffer {
// Provided methods
fn as_slice(&self, idx: usize) -> Result<&[T], FrameError> { ... }
fn as_mut_slice(&mut self, idx: usize) -> Result<&mut [T], FrameError> { ... }
}
Expand description
A series of methods to get mutable and immutable slices of datatype T
from frame planes.
Provided Methods§
Sourcefn as_slice(&self, idx: usize) -> Result<&[T], FrameError>
fn as_slice(&self, idx: usize) -> Result<&[T], FrameError>
Returns an immutable slice of datatype T
with the data associated to
the idx-th frame plane.
Sourcefn as_mut_slice(&mut self, idx: usize) -> Result<&mut [T], FrameError>
fn as_mut_slice(&mut self, idx: usize) -> Result<&mut [T], FrameError>
Returns a mutable slice of datatype T
with the data associated to
the idx-th frame plane.