#[non_exhaustive]pub enum AlphaCompaction {
RetagOpaque,
DropUnusedLanes,
}Expand description
How compact_in_place handles redundant alpha or padding lanes.
Depth (U16 → U8) and chroma (RGB → Gray) compaction still run in both modes whenever
justified by the scan.
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.
RetagOpaque
Upgrade provably opaque Straight/Premultiplied alpha to AlphaMode::Opaque
in metadata without restructuring alpha/padding lanes (0 byte movement when depth and
chroma are unchanged).
DropUnusedLanes
Physically drop redundant alpha or undefined padding lanes in place
(RGBA/BGRA/RGBX/BGRX → RGB, GrayAlpha → Gray).
Trait Implementations§
Source§impl Clone for AlphaCompaction
impl Clone for AlphaCompaction
Source§fn clone(&self) -> AlphaCompaction
fn clone(&self) -> AlphaCompaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AlphaCompaction
Source§impl Debug for AlphaCompaction
impl Debug for AlphaCompaction
impl Eq for AlphaCompaction
Source§impl Hash for AlphaCompaction
impl Hash for AlphaCompaction
Source§impl PartialEq for AlphaCompaction
impl PartialEq for AlphaCompaction
impl StructuralPartialEq for AlphaCompaction
Auto Trait Implementations§
impl Freeze for AlphaCompaction
impl RefUnwindSafe for AlphaCompaction
impl Send for AlphaCompaction
impl Sync for AlphaCompaction
impl Unpin for AlphaCompaction
impl UnsafeUnpin for AlphaCompaction
impl UnwindSafe for AlphaCompaction
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