#[non_exhaustive]#[repr(u8)]pub enum ColorModel {
Gray = 0,
Rgb = 1,
YCbCr = 2,
Oklab = 3,
}Expand description
What the channels represent, independent of channel count or byte order.
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.
Gray = 0
Single grayscale channel.
Rgb = 1
Red, green, blue (or BGR when ByteOrder::Bgr).
YCbCr = 2
Luma + chroma (Y, Cb, Cr).
Oklab = 3
Oklab perceptual color space (L, a, b).
Implementations§
Source§impl ColorModel
impl ColorModel
Sourcepub const fn color_channels(self) -> u8
pub const fn color_channels(self) -> u8
Number of color channels (excluding alpha).
Trait Implementations§
Source§impl Clone for ColorModel
impl Clone for ColorModel
Source§fn clone(&self) -> ColorModel
fn clone(&self) -> ColorModel
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 ColorModel
impl Debug for ColorModel
Source§impl Display for ColorModel
impl Display for ColorModel
Source§impl Hash for ColorModel
impl Hash for ColorModel
Source§impl PartialEq for ColorModel
impl PartialEq for ColorModel
impl Copy for ColorModel
impl Eq for ColorModel
impl StructuralPartialEq for ColorModel
Auto Trait Implementations§
impl Freeze for ColorModel
impl RefUnwindSafe for ColorModel
impl Send for ColorModel
impl Sync for ColorModel
impl Unpin for ColorModel
impl UnsafeUnpin for ColorModel
impl UnwindSafe for ColorModel
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