pub struct RgbAFormat;Expand description
A Zero-Size-Type that contains the definition to convert a given image stream to an RGBA8888 in the Buffer’s .decode_image()
use image::{ImageBuffer, Rgba};
let image: ImageBuffer<Rgba<u8>, Vec<u8>> = buffer.to_image::<RgbAFormat>();Trait Implementations§
Source§impl Clone for RgbAFormat
impl Clone for RgbAFormat
Source§fn clone(&self) -> RgbAFormat
fn clone(&self) -> RgbAFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RgbAFormat
impl Debug for RgbAFormat
Source§impl Default for RgbAFormat
impl Default for RgbAFormat
Source§fn default() -> RgbAFormat
fn default() -> RgbAFormat
Returns the “default value” for a type. Read more
Source§impl FormatDecoder for RgbAFormat
impl FormatDecoder for RgbAFormat
const FORMATS: &'static [FrameFormat]
type Output = Rgba<u8>
Source§fn write_output(
fcc: FrameFormat,
resolution: Resolution,
data: &[u8],
) -> Result<Vec<u8>, NokhwaError>
fn write_output( fcc: FrameFormat, resolution: Resolution, data: &[u8], ) -> Result<Vec<u8>, NokhwaError>
Allocates and returns a
Vec Read moreSource§fn write_output_buffer(
fcc: FrameFormat,
resolution: Resolution,
data: &[u8],
dest: &mut [u8],
) -> Result<(), NokhwaError>
fn write_output_buffer( fcc: FrameFormat, resolution: Resolution, data: &[u8], dest: &mut [u8], ) -> Result<(), NokhwaError>
Writes to a user provided buffer. Read more
Source§impl Hash for RgbAFormat
impl Hash for RgbAFormat
Source§impl Ord for RgbAFormat
impl Ord for RgbAFormat
Source§fn cmp(&self, other: &RgbAFormat) -> Ordering
fn cmp(&self, other: &RgbAFormat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RgbAFormat
impl PartialEq for RgbAFormat
Source§impl PartialOrd for RgbAFormat
impl PartialOrd for RgbAFormat
impl Copy for RgbAFormat
impl Eq for RgbAFormat
impl StructuralPartialEq for RgbAFormat
Auto Trait Implementations§
impl Freeze for RgbAFormat
impl RefUnwindSafe for RgbAFormat
impl Send for RgbAFormat
impl Sync for RgbAFormat
impl Unpin for RgbAFormat
impl UnsafeUnpin for RgbAFormat
impl UnwindSafe for RgbAFormat
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