pub struct Edge {Show 13 fields
pub id: EdgeId,
pub src: VertexId,
pub src_type: TypeName,
pub dst: VertexId,
pub dst_type: TypeName,
pub label: String,
pub properties: BTreeMap<String, PropertyValue>,
pub valid_from: Option<DateTime<Utc>>,
pub valid_to: Option<DateTime<Utc>>,
pub observed_at: Option<DateTime<Utc>>,
pub extracted_at: Option<DateTime<Utc>>,
pub confidence: Option<f32>,
pub evidenced_by: Vec<EvidenceId>,
}Expand description
Edge payload: ant_types::Edge is graph-plane; serialize as-is.
A directed, labeled edge between two vertices, with optional
bitemporal validity. The payload of an edge record.
Fields§
§id: EdgeIdEdge id, unique within the scope.
src: VertexIdSource vertex id.
src_type: TypeNameSource vertex type.
dst: VertexIdDestination vertex id.
dst_type: TypeNameDestination vertex type.
label: StringRelation name (e.g. “hasStakeholder”), NOT namespace-qualified.
properties: BTreeMap<String, PropertyValue>Typed properties carried on the edge, keyed by property name.
valid_from: Option<DateTime<Utc>>Start of real-world validity; None = always was.
valid_to: Option<DateTime<Utc>>End of real-world validity (exclusive); None = still holds.
observed_at: Option<DateTime<Utc>>Wall-clock time the fact was recorded.
extracted_at: Option<DateTime<Utc>>Wall-clock time the extractor produced it.
confidence: Option<f32>Confidence in [0,1] for the fact. None is treated as 1.0 for
matching purposes.
evidenced_by: Vec<EvidenceId>First-class evidence references. Empty by default (backwards-compatible with older payloads).
Implementations§
Source§impl Edge
impl Edge
Sourcepub fn valid_at(&self, t: DateTime<Utc>) -> bool
pub fn valid_at(&self, t: DateTime<Utc>) -> bool
Returns true iff this edge is valid at the given instant.
Edges with no valid_from are treated as valid from -infinity.
Edges with no valid_to are treated as still-holding.
Sourcepub fn valid_between(&self, t1: DateTime<Utc>, t2: DateTime<Utc>) -> bool
pub fn valid_between(&self, t1: DateTime<Utc>, t2: DateTime<Utc>) -> bool
Returns true iff this edge’s validity interval overlaps [t1, t2).
Sourcepub fn still_holds(&self) -> bool
pub fn still_holds(&self) -> bool
True if the edge is currently active (valid_to is None).