pub struct Converter { /* private fields */ }Expand description
Converts frames, keeping its buffers between them: after the first frame of a size, converting another allocates nothing.
Implementations§
Source§impl Converter
impl Converter
Sourcepub fn gray8<'a>(
&'a mut self,
format: PixelFormat,
width: u32,
height: u32,
row_stride: Option<usize>,
src: &'a [u8],
) -> Result<&'a [u8], ConvertError>
pub fn gray8<'a>( &'a mut self, format: PixelFormat, width: u32, height: u32, row_stride: Option<usize>, src: &'a [u8], ) -> Result<&'a [u8], ConvertError>
A monochrome frame as 8-bit grey, one byte per pixel; Mono8 without
line padding is lent back as it is. ConvertError::Unsupported for
anything else.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Converter
impl RefUnwindSafe for Converter
impl Send for Converter
impl Sync for Converter
impl Unpin for Converter
impl UnsafeUnpin for Converter
impl UnwindSafe for Converter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more