pub struct FormatCost {
pub loss_rank: u8,
pub loss_mask: u8,
pub effort: u8,
pub bytes_per_pixel: u8,
}Expand description
Deterministic cost score for comparing candidate encoder formats.
Fields§
§loss_rank: u8Highest severity information loss (lower is better; 0 = lossless).
loss_mask: u8Secondary bitmask of all active loss axes (breaks ties when two candidates share loss_rank).
effort: u8Conversion effort (0 = identity zero-copy, 1 = byte/layout swizzle, 2 = color/transfer math).
bytes_per_pixel: u8Bytes per pixel tiebreaker (smaller preferred when loss & effort match).
Trait Implementations§
Source§impl Clone for FormatCost
impl Clone for FormatCost
Source§fn clone(&self) -> FormatCost
fn clone(&self) -> FormatCost
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 FormatCost
Source§impl Debug for FormatCost
impl Debug for FormatCost
impl Eq for FormatCost
Source§impl Ord for FormatCost
impl Ord for FormatCost
Source§fn cmp(&self, other: &FormatCost) -> Ordering
fn cmp(&self, other: &FormatCost) -> Ordering
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 PartialEq for FormatCost
impl PartialEq for FormatCost
Source§impl PartialOrd for FormatCost
impl PartialOrd for FormatCost
impl StructuralPartialEq for FormatCost
Auto Trait Implementations§
impl Freeze for FormatCost
impl RefUnwindSafe for FormatCost
impl Send for FormatCost
impl Sync for FormatCost
impl Unpin for FormatCost
impl UnsafeUnpin for FormatCost
impl UnwindSafe for FormatCost
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