pub struct ConversionCost {
pub effort: u16,
pub loss: u16,
}Expand description
Two-axis conversion cost: computational effort vs. information loss.
These are independent concerns:
- A fast conversion can be very lossy (f32 HDR → u8 sRGB clamp).
- A slow conversion can be lossless (u8 sRGB → f32 Linear).
- A consumer’s fused path can be fast with the same loss as our path.
ConvertIntent controls how the two axes are weighted for ranking.
Fields§
§effort: u16Computational work (cycles, not quality). Lower is faster.
loss: u16Information destroyed (precision, gamut, channels). Lower is more faithful.
Implementations§
Trait Implementations§
Source§impl Add for ConversionCost
impl Add for ConversionCost
Source§impl Clone for ConversionCost
impl Clone for ConversionCost
Source§fn clone(&self) -> ConversionCost
fn clone(&self) -> ConversionCost
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 ConversionCost
impl Debug for ConversionCost
Source§impl Default for ConversionCost
impl Default for ConversionCost
Source§fn default() -> ConversionCost
fn default() -> ConversionCost
Returns the “default value” for a type. Read more
Source§impl PartialEq for ConversionCost
impl PartialEq for ConversionCost
impl Copy for ConversionCost
impl Eq for ConversionCost
impl StructuralPartialEq for ConversionCost
Auto Trait Implementations§
impl Freeze for ConversionCost
impl RefUnwindSafe for ConversionCost
impl Send for ConversionCost
impl Sync for ConversionCost
impl Unpin for ConversionCost
impl UnsafeUnpin for ConversionCost
impl UnwindSafe for ConversionCost
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