pub struct EdgeSlot {
pub a: EntityId,
pub rel: TermId,
pub b: EntityId,
pub fact: FactId,
pub edge: EdgeId,
pub valid_from: u64,
}Expand description
A typed graph edge, currently open (28-byte slot, Ordered arena, key
[a BE | rel BE | b BE], payload fact | edge | valid_from).
Stored twice, in two mirrored arenas: the out-arena keys by
(src, rel, dst), the in-arena by (dst, rel, src) — a/b are
whichever end comes first in that arena’s key. Neighbor traversal is a
prefix range scan. An edge is unique per (src, rel, dst); re-linking
closes this version and opens a new one.
The slot carries the identity of its open EdgeHistorySlot version —
edge and valid_from are exactly that record’s key tail — so closing an
edge addresses its history record directly instead of searching for the
open version among the triple’s other versions.
Fields§
§a: EntityIdFirst key component (out-arena: source; in-arena: destination).
rel: TermIdInterned relation term ("works_at", "owns", …).
b: EntityIdSecond key component (out-arena: destination; in-arena: source).
fact: FactIdProvenance fact, or FactId::NONE. Like
FactRecord::revises, it may name a burned id once the
provenance fact has been forgotten and purged.
edge: EdgeIdThe open edge version this slot mirrors.
valid_from: u64Start of the open version’s validity — with edge, the key tail of
its EdgeHistorySlot.