pub enum LinkSite {
Relation {
field: String,
index: Option<usize>,
},
Body(Range<usize>),
}Expand description
Where in a document a forward link is written — a frontmatter relation
field or a body wikilink. Carried by every link-resolution finding
(prov’s Finding, derived in validate — see
StructuralFact) and every CensusEntry so a report can point at the
exact site.
Variants§
Relation
A frontmatter relation field, by name (e.g. contents, links) and,
where the field is a list, by the item’s position in it.
The index is what lets a consumer point at the item rather than the
key: a contents list that names the same missing target twice is two
findings, and without it nothing in either says which row is which.
None for a scalar field (part_of, content) — see
Edge::index for how a list is counted.
Body(Range<usize>)
A link in the body, at this byte span: a [[…]] wikilink, a
markdown/djot [label](target), or the [alt](target) of an
 image (the span starts after the !, as
BodyLink reports it).
Implementations§
Trait Implementations§
impl Eq for LinkSite
impl StructuralPartialEq for LinkSite
Auto Trait Implementations§
impl Freeze for LinkSite
impl RefUnwindSafe for LinkSite
impl Send for LinkSite
impl Sync for LinkSite
impl Unpin for LinkSite
impl UnsafeUnpin for LinkSite
impl UnwindSafe for LinkSite
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.