#[non_exhaustive]pub struct Divergence {
pub source_id: String,
pub target_id: String,
pub edge_type: String,
pub valid_from: String,
pub valid_to: String,
pub weight: f64,
pub branch_id: String,
}Expand description
One belief a holds that b does not (§15.4, 0.14.11, D-228).
Returned by Database::diff, one per edge key on
which the two lineages disagree, ordered by that key. The fields describe
a’s side; b’s side is diff(b, a), which is the same question asked
the other way round.
§branch_id is the interesting field
It is the lineage on a’s ancestry that actually holds this row, and it is
what separates what this exploration concluded from what it still holds
while the trunk moved on. When it equals a, the divergence is a’s own
assertion. When it does not, a is retaining an ancestor’s belief that b
no longer shares — which happens whenever b churned the key after a
forked, and is exactly the case that makes “the divergence is the set of
rows carrying the branch’s own id” false. See D-228 for the two shapes
that break it.
§No constructor, and no Eq
#[non_exhaustive] with nothing owed, for Branch’s reason: this type
only ever travels outward and nothing public accepts one, so the attribute
buys the additive field and takes nothing back.
weight is an f64, so Eq, Ord and Hash are not derivable. That is
a real difference from EdgeBelief, which
carries no weight and is compared as a canonical form by the snapshot
suite. Ordering here comes from the query instead, on the edge key, so two
diffs of the same pair are still directly comparable.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_id: StringThe edge’s source concept.
target_id: StringThe edge’s target concept.
edge_type: StringThe edge’s type.
valid_from: StringWhen the asserted interval opens — part of the key, not of the belief.
valid_to: StringWhen a believes the interval closes, or the open sentinel.
weight: f64The weight a believes.
branch_id: StringThe lineage on a’s ancestry holding this row. See the type docs.
Trait Implementations§
Source§impl Clone for Divergence
impl Clone for Divergence
Source§fn clone(&self) -> Divergence
fn clone(&self) -> Divergence
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 Divergence
impl Debug for Divergence
Source§impl PartialEq for Divergence
impl PartialEq for Divergence
Source§impl PartialOrd for Divergence
impl PartialOrd for Divergence
impl StructuralPartialEq for Divergence
Auto Trait Implementations§
impl Freeze for Divergence
impl RefUnwindSafe for Divergence
impl Send for Divergence
impl Sync for Divergence
impl Unpin for Divergence
impl UnsafeUnpin for Divergence
impl UnwindSafe for Divergence
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request