pub struct Graph { /* private fields */ }Implementations§
Source§impl Graph
impl Graph
pub fn build(records: Vec<Arc<Record>>) -> (Graph, Vec<Diagnostic>)
pub fn records(&self) -> impl Iterator<Item = &Record>
pub fn get(&self, id: &Id) -> Option<&Record>
Sourcepub fn is_superseded(&self, id: &Id) -> bool
pub fn is_superseded(&self, id: &Id) -> bool
True iff id has been superseded — it carries at least one adopted successor edge,
whether or not that resolves to a single live atom. Direct-edge semantics only;
whether a safe terminal migration exists is effective_successor’s question.
Sourcepub fn effective_successor(&self, id: &Id) -> Option<&Id>
pub fn effective_successor(&self, id: &Id) -> Option<&Id>
The terminal adopted successor of id — the live atom a stale citation should
migrate to — chasing multi-hop chains. Returns None when no safe terminal
exists: the chain enters a cycle, or it runs through an ambiguous node (one with
multiple adopted successors), which is itself unresolved. Downstream rules must not
recommend a migration target in those cases.
Sourcepub fn pending_successors(&self, id: &Id) -> &[Id]
pub fn pending_successors(&self, id: &Id) -> &[Id]
Proposed/open records superseding id that haven’t been adopted — the
pending-supersession view (e.g. open forks).
Sourcepub fn structured_citations(&self, from: &Id) -> Vec<Cite>
pub fn structured_citations(&self, from: &Id) -> Vec<Cite>
Typed edges out of from (depends_on / supports / related) — the E3 error path.
Sourcepub fn bare_mentions(&self, from: &Id) -> Vec<Id>
pub fn bare_mentions(&self, from: &Id) -> Vec<Id>
Bare prose mentions out of from — the E3 warning path.