pub enum Loss {
None,
Flagged,
Destructive,
}Expand description
How much a rule gives up.
Variants§
None
Nothing is lost. The information is still there, just in another shape.
Flagged
Information is lost, but the loss is recorded in the report and the caller has asked for it.
Destructive
Information is lost in a way that changes what the value means.
Not the same as Loss::Flagged: a text placeholder for audio is not a
degraded audio block, it is a different thing that says it stands in
for audio. A caller that did not ask for that is not getting what it
asked for.
Implementations§
Source§impl Loss
impl Loss
Sourcepub const fn is_lossless(self) -> bool
pub const fn is_lossless(self) -> bool
Whether nothing is lost.
Sourcepub const fn is_acceptable(self) -> bool
pub const fn is_acceptable(self) -> bool
Whether the rule is safe for a caller that promised “lossless or flagged”.
Trait Implementations§
impl Copy for Loss
impl Eq for Loss
Source§impl Ord for Loss
impl Ord for Loss
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Loss
impl PartialOrd for Loss
impl StructuralPartialEq for Loss
Auto Trait Implementations§
impl Freeze for Loss
impl RefUnwindSafe for Loss
impl Send for Loss
impl Sync for Loss
impl Unpin for Loss
impl UnsafeUnpin for Loss
impl UnwindSafe for Loss
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