pub enum LinkType {
Advances,
Supersedes,
Contradicts,
Supports,
Questions,
DerivedFrom,
Custom(String),
}Expand description
Closed set of record-to-record link types + a Custom escape hatch.
See docs/record_link_model_rfc.md. The recall-time proximity polarity
(whether surfacing one endpoint should boost or demote the other) is a
pure function of the variant — see LinkType::recall_polarity.
Variants§
Advances
This record builds on / improves the target (newer is better).
Supersedes
This record replaces the target. Does NOT auto-tombstone the target (semantic claim, not a lifecycle action). Recall demotes the superseded predecessor.
Contradicts
This record disagrees with the target. Quasi-symmetric — queried bidirectionally.
Supports
This record provides evidence for the target.
Questions
This record raises a question about the target.
DerivedFrom
This record was derived from / inspired by the target (provenance, no correctness claim — distinct from Advances).
Custom(String)
Extensibility hatch. Stored as custom:<name>; engine does not
interpret the name (treated as a weak positive at recall time).
Implementations§
Source§impl LinkType
impl LinkType
Sourcepub fn as_str(&self) -> String
pub fn as_str(&self) -> String
Serialize to the canonical string stored in record_links.link_type.
Sourcepub fn from_str_lenient(s: &str) -> LinkType
pub fn from_str_lenient(s: &str) -> LinkType
Parse from the stored string. custom:<name> round-trips to
Custom(name); any other unrecognized string also becomes
Custom(...) so forward-compat strings from a newer node don’t
hard-error on an older one.
Sourcepub fn is_symmetric(&self) -> bool
pub fn is_symmetric(&self) -> bool
Whether this link type is treated as undirected at traversal /
recall time. Only Contradicts is symmetric.
Sourcepub fn recall_polarity(&self) -> LinkRecallPolarity
pub fn recall_polarity(&self) -> LinkRecallPolarity
Recall-time polarity. Pure function of the variant. See the relation-aware-scoring table in the RFC.
Trait Implementations§
impl Eq for LinkType
impl StructuralPartialEq for LinkType
Auto Trait Implementations§
impl Freeze for LinkType
impl RefUnwindSafe for LinkType
impl Send for LinkType
impl Sync for LinkType
impl Unpin for LinkType
impl UnsafeUnpin for LinkType
impl UnwindSafe for LinkType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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