pub struct LinkEdge {
pub relation: Option<String>,
pub path: String,
}Expand description
One link between two documents, named by the relation that carries it.
A vault declares its own relations — sequel, translation_of,
author, whatever its configuration says — so the name is data, never
something this crate knows. Nothing here may hardcode a vocabulary: whatever
names arrive are the names a template can address.
relation is None for a link written in prose, which has
no name to be filed under. Those reach a template through backlinks, the
flat union, and nowhere else — a reserved key for them would collide with a
relation a vault is entitled to declare.
path is the document at the far end, spelled as
SourceDoc::path spells it — the same
coordinates, so an edge can be matched to the page it names without either
side re-deriving the other’s naming rule.
Fields§
§relation: Option<String>The relation this edge is written in, or None for a body link.
path: StringThe document at the far end.
Trait Implementations§
impl Eq for LinkEdge
Source§impl Ord for LinkEdge
impl Ord for LinkEdge
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for LinkEdge
impl PartialOrd for LinkEdge
impl StructuralPartialEq for LinkEdge
Auto Trait Implementations§
impl Freeze for LinkEdge
impl RefUnwindSafe for LinkEdge
impl Send for LinkEdge
impl Sync for LinkEdge
impl Unpin for LinkEdge
impl UnsafeUnpin for LinkEdge
impl UnwindSafe for LinkEdge
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.