pub struct DanglingLink {
pub kind: DanglingLinkKind,
pub from: EntityId,
pub target_id: EntityId,
pub target_path: String,
pub section: Option<String>,
}Expand description
One dangling-reference finding surfaced by
memstead_health include=["dangling_links"] and projected onto the
consistency axis by include=["integrity"].
Three conditions reach this type, and kind says which:
a body wiki-link whose target has no markdown file (the post-delete /
renamed-without-rewrite / typo signal), a body wiki-link to a fully
written entity that the referrer does not relate to, and a relationships
row naming an entity absent from the store. Their repairs differ, so the
codes differ; see DanglingLinkKind.
The prose this replaces described only the first condition, which is how the fusion survived: the type read as if it had one subject while producing three (04/06, criterion 6).
Fields§
§kind: DanglingLinkKindWhich of the three conditions this is, and therefore which repair applies. Carried from the one producer, never re-derived: the split happens where the conditions are distinguished (04/06).
from: EntityId§target_id: EntityIdCanonical ID the wiki-link resolves to.
NOT necessarily a stub: it is a stub or absent for
DanglingLinkKind::LinkTargetMissing and
DanglingLinkKind::RelationTargetMissing, and a real, non-stub
entity for DanglingLinkKind::LinkNotRelated, where the entity is
fine and the relationship row is what is missing. The old wording said
“stub-typed in the store”, which was true of one of the three
conditions this type carried.
target_path: StringResolved mem-relative path segment of the target ID (e.g. gone
for specs--gone). This is the normalised form the engine records —
not the literal [[…]] characters as authored. Widening WikiLink
to preserve the authored form is a future-work item if agents need
grep-to-source precision.
section: Option<String>Section key the body wiki-link appears in (e.g. "purpose").
None for DanglingLinkKind::RelationTargetMissing, whose source is
the auto-managed relationships block rather than a body section. That
absence used to be the ONLY way to tell that condition apart, which is
why kind exists: a reader should not have to inspect a payload for
nulls to learn which repair applies (04/06, criterion 4).
Trait Implementations§
Source§impl Clone for DanglingLink
impl Clone for DanglingLink
Source§fn clone(&self) -> DanglingLink
fn clone(&self) -> DanglingLink
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 DanglingLink
impl Debug for DanglingLink
Auto Trait Implementations§
impl Freeze for DanglingLink
impl RefUnwindSafe for DanglingLink
impl Send for DanglingLink
impl Sync for DanglingLink
impl Unpin for DanglingLink
impl UnsafeUnpin for DanglingLink
impl UnwindSafe for DanglingLink
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more