pub struct Edge {
pub relation: String,
pub index: Option<usize>,
pub target: String,
}Expand description
A resolved link found in a document’s metadata: which relation declared it, where in that relation’s value it sits, and the raw (unresolved) target string.
Fields§
§relation: StringThe relation (frontmatter key) that declared this link.
index: Option<usize>The item’s position in the relation’s list, counting every item as
written — a non-string item that yields no edge still takes its place —
so the number is the one an editor reading the same list would use.
None when the relation is a bare scalar.
target: StringThe raw target string exactly as written in the metadata.
Trait Implementations§
impl Eq for Edge
impl StructuralPartialEq for Edge
Auto Trait Implementations§
impl Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnsafeUnpin for Edge
impl UnwindSafe for Edge
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.