#[non_exhaustive]pub enum PixFmt {
Show 15 variants
Mono8,
Mono32f,
RGB8,
RGBA8,
BayerRG8,
BayerRG32f,
BayerBG8,
BayerBG32f,
BayerGB8,
BayerGB32f,
BayerGR8,
BayerGR32f,
YUV444,
YUV422,
NV12,
}
Expand description
This type allows runtime inspection of pixel format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mono8
Mono32f
RGB8
RGBA8
BayerRG8
BayerRG32f
BayerBG8
BayerBG32f
BayerGB8
BayerGB32f
BayerGR8
BayerGR32f
YUV444
YUV422
NV12
Implementations§
source§impl PixFmt
impl PixFmt
sourcepub fn to_static<FMT: PixelFormat>(&self) -> Option<PhantomData<FMT>>
pub fn to_static<FMT: PixelFormat>(&self) -> Option<PhantomData<FMT>>
Convert a runtime variant into a static type.
sourcepub const fn bits_per_pixel(&self) -> u8
pub const fn bits_per_pixel(&self) -> u8
The average number of bits per pixel.
Trait Implementations§
source§impl PartialEq for PixFmt
impl PartialEq for PixFmt
source§impl<FMT> TryFrom<PhantomData<FMT>> for PixFmtwhere
FMT: PixelFormat,
impl<FMT> TryFrom<PhantomData<FMT>> for PixFmtwhere
FMT: PixelFormat,
impl Copy for PixFmt
impl StructuralPartialEq for PixFmt
Auto Trait Implementations§
impl Freeze for PixFmt
impl RefUnwindSafe for PixFmt
impl Send for PixFmt
impl Sync for PixFmt
impl Unpin for PixFmt
impl UnwindSafe for PixFmt
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