av_data::frame

Trait FrameBufferConv

Source
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§

Source

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.

Source

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.

Implementors§