pub enum Fidelity {
Lossless,
Degraded,
Unrepresentable,
}Expand description
How faithfully the markdown projection carries an island: the closed view
over Loss, and what a consumer switches on.
The KnownIslandType twin, one axis over,
and exhaustive for the same reason: a consumer laddering on fidelity has no
safe fallthrough for a rung it does not know, so a new rung is a major bump
rather than a silent gap.
Variants§
Lossless
Round-trips identically.
Degraded
Round-trips visibly, not identically.
Unrepresentable
No markdown encoding, and where an uninterpretable class lands.
Implementations§
Source§impl Fidelity
impl Fidelity
Sourcepub const ALL: &'static [Fidelity]
pub const ALL: &'static [Fidelity]
Every level, faithful first. The one enumeration point, so a reader that needs the closed set whole (the WASM surface’s class union, say) asks rather than re-spelling it.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The wire class naming this level: the one place a class is spelled, which
Loss’s consts and Fidelity::parse both read.
Sourcepub fn parse(class: &str) -> Option<Fidelity>
pub fn parse(class: &str) -> Option<Fidelity>
Parse a wire class into the closed view. None is the open-set escape
hatch (an uninterpretable class), which Loss::fidelity reads as
Unrepresentable.
Trait Implementations§
impl Copy for Fidelity
impl Eq for Fidelity
impl StructuralPartialEq for Fidelity
Auto Trait Implementations§
impl Freeze for Fidelity
impl RefUnwindSafe for Fidelity
impl Send for Fidelity
impl Sync for Fidelity
impl Unpin for Fidelity
impl UnsafeUnpin for Fidelity
impl UnwindSafe for Fidelity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.