pub struct Catalogue { /* private fields */ }Expand description
The validated catalogue and every index derived from it. Immutable: built once from an index and a registry, read many times.
Implementations§
Source§impl Catalogue
impl Catalogue
Sourcepub fn build(index: &Index, registry: &CapabilityRegistry) -> Self
pub fn build(index: &Index, registry: &CapabilityRegistry) -> Self
Build the catalogue from an index and the registry its capability references resolve against. Deterministic: the same objects produce the same value, and no derivation reads a clock or the filesystem.
Source§impl Catalogue
impl Catalogue
Sourcepub fn all(&self) -> &[Moment]
pub fn all(&self) -> &[Moment]
Every moment the catalogue holds, in presentation order, whatever its status.
Sourcepub fn findings(&self) -> &[Finding]
pub fn findings(&self) -> &[Finding]
Every finding: unresolved references, duplicate identities, and records that do not meet the floor their status promises.
Sourcepub fn fingerprint(&self) -> &str
pub fn fingerprint(&self) -> &str
The hash of the catalogue’s own sources.
Sourcepub fn responsibilities(&self, id: &str) -> &[String]
pub fn responsibilities(&self, id: &str) -> &[String]
The responsibilities a moment touches, derived from the claims it names.
Sourcepub fn backlinks(&self, id: &str) -> &[String]
pub fn backlinks(&self, id: &str) -> &[String]
The moments that name this one in their related. Never authored.
Sourcepub fn naming(&self, field: &str, value: &str) -> Vec<&Moment>
pub fn naming(&self, field: &str, value: &str) -> Vec<&Moment>
The moments that name this thing, whatever kind of thing it is. This is the one reverse index every “the moments this answers” list is read from.
Sourcepub fn signal_owner(&self, signal: &str) -> Option<&Moment>
pub fn signal_owner(&self, signal: &str) -> Option<&Moment>
The moment a signal belongs to.