pub enum StructuralFact {
Unreadable {
doc: PathBuf,
error: String,
},
IdMismatch {
doc: PathBuf,
frontmatter: Id,
registry: Option<Id>,
},
UnregisteredId {
doc: PathBuf,
frontmatter: Id,
},
UnstampedId {
doc: PathBuf,
registry: Id,
},
DuplicateContainment {
doc: PathBuf,
target: String,
},
MissingInverse {
doc: PathBuf,
child: PathBuf,
inverse: String,
},
CaseMismatch {
doc: PathBuf,
site: LinkSite,
target: String,
actual: String,
},
BrokenLink {
doc: PathBuf,
site: LinkSite,
target: String,
},
ManifestConflict {
doc: PathBuf,
},
}Expand description
A structural observation the walk makes as it traverses — not a verdict,
just what it saw: a document that would not load, a self-stored id
disagreeing with (or absent from) the registry, a spanning edge that
revisits an already-reached node, a spanning child whose inverse field
does not point back, or a content pointer that failed to resolve.
These are facts about traversal state — they need the queue, the
visited set, the inverse lookup — so only the walk can raise them; a
single CensusEntry’s Resolution is not enough (that half of the
story is validate’s CensusEntry-keyed
prov’s validate instead, since a resolution is already the
fact). validate::check turns each variant here into the
prov’s Finding that names it — one to one, since
the walk already knows exactly what happened and there is nothing left to
infer. Keeping the enum here rather than importing Finding is what
keeps graph a pure “plain text → walkable graph” layer: it reports what
it found, never how that should be judged.
Variants§
Unreadable
A document that exists but could not be read or parsed.
IdMismatch
A document’s self-stored id frontmatter disagrees with the registry
(or claims an id the registry hands to a different document).
registry is None when the registry has no record of the path at
all under this id.
UnregisteredId
A document carries a self-stored id the registry has no record of.
UnstampedId
A stamping workspace’s registered document does not carry its own
id frontmatter.
DuplicateContainment
A spanning target already reached by the walk — a cycle or a second parent.
MissingInverse
A spanning child whose inverse field does not link back to doc.
CaseMismatch
A content pointer resolving only case-insensitively.
BrokenLink
A content pointer resolving to nothing on disk.
ManifestConflict
A node declaring both content and manifest — a sidecar for one
payload and for a whole directory at once. The two are mutually
exclusive (crate::manifest), and neither reading is safe to pick.
Trait Implementations§
Source§impl Clone for StructuralFact
impl Clone for StructuralFact
Source§fn clone(&self) -> StructuralFact
fn clone(&self) -> StructuralFact
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StructuralFact
impl Debug for StructuralFact
impl Eq for StructuralFact
Source§impl PartialEq for StructuralFact
impl PartialEq for StructuralFact
impl StructuralPartialEq for StructuralFact
Auto Trait Implementations§
impl Freeze for StructuralFact
impl RefUnwindSafe for StructuralFact
impl Send for StructuralFact
impl Sync for StructuralFact
impl Unpin for StructuralFact
impl UnsafeUnpin for StructuralFact
impl UnwindSafe for StructuralFact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.