#[non_exhaustive]pub enum LossKind {
None,
Depth,
Gamut,
Chroma,
Alpha,
}Expand description
Category of information lost when converting src to a candidate 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.
None
Zero information loss (exact or lossless widening/swizzle).
Depth
Quantization or bit-depth narrowing (F32 → U16 → U8, RGBA8 → RGB10A2).
Gamut
Gamut narrowing, signal-range scaling, or HDR → SDR compression.
Chroma
Dropping color into grayscale (RGB → Gray).
Alpha
Dropping unproven non-opaque alpha.
Trait Implementations§
impl Copy for LossKind
impl Eq for LossKind
Source§impl Ord for LossKind
impl Ord for LossKind
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
Source§impl PartialOrd for LossKind
impl PartialOrd for LossKind
impl StructuralPartialEq for LossKind
Auto Trait Implementations§
impl Freeze for LossKind
impl RefUnwindSafe for LossKind
impl Send for LossKind
impl Sync for LossKind
impl Unpin for LossKind
impl UnsafeUnpin for LossKind
impl UnwindSafe for LossKind
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