pub enum LinkOrigin {
Body,
FrontMatter {
field: Option<String>,
},
}Expand description
Where a cross-file link was written.
The index holds one entry per file while configuration resolves per file, so it records where a link came from rather than whether some configuration wanted it, and the rule reading it applies its own settings at check time. That is the only arrangement that can be right when two files resolving different configurations reference the same target.
Variants§
Body
The document body.
FrontMatter
A frontmatter value that reads as a path, such as link: other.md#a.
field is the lowercased top-level key owning the value, or None where
no owner is determinable. The two are kept distinct from Body so a
value with no determinable owner is still recognizable as frontmatter.
A Markdown link that happens to be written inside frontmatter
(link: [a](other.md#a)) is Body: it is real Markdown link syntax, so
the extraction that finds body links finds it and rename can rewrite it.
Trait Implementations§
Source§impl Clone for LinkOrigin
impl Clone for LinkOrigin
Source§fn clone(&self) -> LinkOrigin
fn clone(&self) -> LinkOrigin
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 LinkOrigin
impl Debug for LinkOrigin
Source§impl<'de> Deserialize<'de> for LinkOrigin
impl<'de> Deserialize<'de> for LinkOrigin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LinkOrigin
Source§impl PartialEq for LinkOrigin
impl PartialEq for LinkOrigin
Source§impl Serialize for LinkOrigin
impl Serialize for LinkOrigin
impl StructuralPartialEq for LinkOrigin
Auto Trait Implementations§
impl Freeze for LinkOrigin
impl RefUnwindSafe for LinkOrigin
impl Send for LinkOrigin
impl Sync for LinkOrigin
impl Unpin for LinkOrigin
impl UnsafeUnpin for LinkOrigin
impl UnwindSafe for LinkOrigin
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.