#[non_exhaustive]pub enum PixelFormat {
Mono8,
Mono16,
Mono32F,
Rgb8,
Bgr8,
Rgba8,
Bgra8,
Rgb16,
Rgba16,
Rgb32F,
Rgba32F,
}Expand description
A pixel format from the §24.3 Image[pixel=…] table.
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
Single-channel 8-bit grey.
Mono16
Single-channel 16-bit grey.
Mono32F
Single-channel 32-bit float grey.
Rgb8
Three-channel 8-bit RGB.
Bgr8
Three-channel 8-bit BGR.
Rgba8
Four-channel 8-bit RGBA.
Bgra8
Four-channel 8-bit BGRA.
Rgb16
Three-channel 16-bit RGB.
Rgba16
Four-channel 16-bit RGBA.
Rgb32F
Three-channel 32-bit float RGB.
Rgba32F
Four-channel 32-bit float RGBA.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn sample_type(self) -> DataType
pub const fn sample_type(self) -> DataType
The columnar type one sample occupies.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
impl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Display for PixelFormat
impl Display for PixelFormat
impl Eq for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl Ord for PixelFormat
impl Ord for PixelFormat
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
Source§impl PartialOrd for PixelFormat
impl PartialOrd for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
impl<T> Allocation for T
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