pub enum Fidelity {
ByteLossless,
ValueLossless,
Semantic,
}Expand description
How faithfully a reconstruction reproduces its source.
One vocabulary for every surface that has to state what it gave up. It was
introduced for session ARTIFACTS (harness.v1.sessions.export reports a
level plus a named residue list); session LOADS report the same pair,
because a read-only VIEW of a session is allowed to settle for
Fidelity::Semantic where a continuation is not (see
a session loader’s explicitly semantic/read-only mode).
Variants§
ByteLossless
The reconstruction reproduces the source bytes exactly.
ValueLossless
Every value survives; only the container bytes were re-synthesized.
Semantic
Meaning survives; the named residue says exactly what did not.
Implementations§
Source§impl Fidelity
impl Fidelity
Sourcepub fn tolerates_residue(self) -> bool
pub fn tolerates_residue(self) -> bool
Whether this level tolerates named loss.
Only Fidelity::Semantic does — every stricter level must fail
loudly instead of degrading, which is what keeps continuation,
transfer and export guarantees intact.
Trait Implementations§
impl Copy for Fidelity
Source§impl<'de> Deserialize<'de> for Fidelity
impl<'de> Deserialize<'de> for Fidelity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Fidelity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Fidelity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Fidelity
Source§impl Serialize for Fidelity
impl Serialize for Fidelity
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.