pub struct SnapshotDiff {
pub a: ZsnapHeader,
pub b: ZsnapHeader,
pub added: Vec<String>,
pub removed: Vec<String>,
pub changed: Vec<KeyChange>,
pub unchanged: u64,
pub truncated: u64,
pub origin_map: Asked<Vec<OriginPair>>,
pub unmapped: Vec<Unmapped>,
pub by_subject: Asked<Vec<SubjectDelta>>,
}Expand description
What two snapshots disagree about (RFC 13 §4.4): both spans stated, the facets kept apart, and an origin that could not be paired listed rather than dropped.
Fields§
§a: ZsnapHeaderThe earlier side’s header — its span is half of what a diff MUST state.
b: ZsnapHeaderThe later side’s header.
added: Vec<String>Keys in b and not in a.
removed: Vec<String>Keys in a and not in b.
changed: Vec<KeyChange>Keys in both whose value, verdict, registration, holder or stamp moved — each facet reported on its own.
unchanged: u64Keys in both that are identical on every facet.
truncated: u64Differing keys past the listing bound — counted, never dropped (O6). Absent at zero.
origin_map: Asked<Vec<OriginPair>>The origin alignment across deployments, when one was asked for (#220). Absent when not.
unmapped: Vec<Unmapped>Origins the alignment could not pair — listed, never dropped (RFC 13 §4.4). Absent when empty.
by_subject: Asked<Vec<SubjectDelta>>The per-subject roll-up, when asked for. Absent when not — and
absent on a refused diff, where the alignment was
asked and the comparison declined.
Implementations§
Source§impl SnapshotDiff
impl SnapshotDiff
Sourcepub fn refused(&self) -> bool
pub fn refused(&self) -> bool
The alignment was asked and left origins unpaired, so the comparison was not made (#220): the pairs and the unpaired ride the report, nothing is listed as added, removed or changed, and the judgement is the reserved non-verdict — a diff that compared around an origin it could not place would be confident nonsense.
Sourcepub fn differs(&self) -> bool
pub fn differs(&self) -> bool
Whether anything at all differs — added, removed, changed, or differences past the bound.
Sourcepub fn to_judgement(&self) -> Judgement
pub fn to_judgement(&self) -> Judgement
The RFC 13 §1.2 projection: a difference is the finding
(Established, exit 1), identity the clean answer. A diff over two
parsed files is always asked; the one unestablished pole is a
refused alignment, where the observation cannot
carry the claim (Unobservable, exit 2).
Trait Implementations§
Source§impl Clone for SnapshotDiff
impl Clone for SnapshotDiff
Source§fn clone(&self) -> SnapshotDiff
fn clone(&self) -> SnapshotDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SnapshotDiff
impl Debug for SnapshotDiff
Source§impl<'de> Deserialize<'de> for SnapshotDiff
impl<'de> Deserialize<'de> for SnapshotDiff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SnapshotDiff
impl PartialEq for SnapshotDiff
Source§impl Serialize for SnapshotDiff
impl Serialize for SnapshotDiff
impl StructuralPartialEq for SnapshotDiff
Auto Trait Implementations§
impl Freeze for SnapshotDiff
impl RefUnwindSafe for SnapshotDiff
impl Send for SnapshotDiff
impl Sync for SnapshotDiff
impl Unpin for SnapshotDiff
impl UnsafeUnpin for SnapshotDiff
impl UnwindSafe for SnapshotDiff
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more