pub struct EdgeHistorySlot {
pub a: EntityId,
pub rel: TermId,
pub b: EntityId,
pub edge: EdgeId,
pub fact: FactId,
pub flags: u16,
pub kind: u16,
pub recorded_at: u64,
pub valid_from: u64,
pub valid_to: u64,
}Expand description
A temporal typed graph edge version (48-byte slot, Ordered arena, key
[a BE | valid_from BE | edge BE]).
Stored twice, in two mirrored history arenas with the same orientation as
EdgeSlot. The hot current graph still uses EdgeSlot; this record is
the source of truth for historical as_of traversal.
The key is time-ordered per entity, not grouped by relation. An
as_of(t) traversal wants the versions valid at one instant, and at most
one version of a (a, rel, b) triple is valid at any instant, so grouping
by triple forces a walk through every version of every triple to find the
few that answer. Ordering by valid_from instead lets the traversal start
at t and walk backwards through the versions that most recently became
true — the candidates — and stop when it has enough.
Fields§
§a: EntityIdFirst key component (out-arena: source; in-arena: destination).
rel: TermIdInterned relation term.
b: EntityIdSecond key component (out-arena: destination; in-arena: source).
edge: EdgeIdEdge-version id.
fact: FactIdProvenance fact, or FactId::NONE.
flags: u16Edge flags; see edge_flags.
kind: u16Reserved for future lifecycle states.
recorded_at: u64Knowledge axis: when the edge version was recorded.
valid_from: u64Truth axis: start of the edge validity interval.
valid_to: u64Truth axis: end of the edge validity interval; VALID_TO_OPEN =
current.
Implementations§
Trait Implementations§
Source§impl Clone for EdgeHistorySlot
impl Clone for EdgeHistorySlot
Source§fn clone(&self) -> EdgeHistorySlot
fn clone(&self) -> EdgeHistorySlot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more