pub struct TemporalEdgeResolver<C> { /* private fields */ }Expand description
Invalidates conflicting edges instead of deleting them, preserving history.
The production impl. A new edge conflicts with a current edge when they share
subject and relation and the relation is RelationCardinality::SingleValued
(one live object at a time). Conflicting edges are closed (added to
EdgeResolution::close); the new edge opens as current. Multi-valued
relations never conflict, so every edge coexists.
Winner is decided by recency alone — a newer fact supersedes an older one regardless of confidence, matching the row-level supersession model where “a newer fact won” is purely temporal. Confidence rides on the edge for the read path but never gates invalidation.
A restatement — the same single-valued fact observed again later — folds
into the current edge rather than opening a parallel one: the resolution’s
open adopts the existing edge’s valid_from (the edge’s identity), so the
commit’s MERGE matches it and appends this source’s pid. valid_from thus
means “when the fact first became true,” not “when it was last restated.”
Implementations§
Source§impl<C: EdgeCatalog> TemporalEdgeResolver<C>
impl<C: EdgeCatalog> TemporalEdgeResolver<C>
Sourcepub fn new(catalog: C, policy: CardinalityPolicy) -> Self
pub fn new(catalog: C, policy: CardinalityPolicy) -> Self
Builds a temporal resolver over catalog with the cardinality policy.
Trait Implementations§
Source§impl<C: Clone> Clone for TemporalEdgeResolver<C>
impl<C: Clone> Clone for TemporalEdgeResolver<C>
Source§fn clone(&self) -> TemporalEdgeResolver<C>
fn clone(&self) -> TemporalEdgeResolver<C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C: Debug> Debug for TemporalEdgeResolver<C>
impl<C: Debug> Debug for TemporalEdgeResolver<C>
Source§impl<C: EdgeCatalog> EdgeResolver for TemporalEdgeResolver<C>
impl<C: EdgeCatalog> EdgeResolver for TemporalEdgeResolver<C>
Auto Trait Implementations§
impl<C> Freeze for TemporalEdgeResolver<C>where
C: Freeze,
impl<C> RefUnwindSafe for TemporalEdgeResolver<C>where
C: RefUnwindSafe,
impl<C> Send for TemporalEdgeResolver<C>where
C: Send,
impl<C> Sync for TemporalEdgeResolver<C>where
C: Sync,
impl<C> Unpin for TemporalEdgeResolver<C>where
C: Unpin,
impl<C> UnsafeUnpin for TemporalEdgeResolver<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for TemporalEdgeResolver<C>where
C: UnwindSafe,
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<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> 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 moreSource§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