pub enum LinkKind {
Supersedes,
SupersededBy,
Amends,
AmendedBy,
RelatesTo,
Custom(String),
}Expand description
The kind of link between ADRs.
Variants§
Supersedes
This ADR supersedes the target.
SupersededBy
This ADR is superseded by the target.
Amends
This ADR amends the target.
AmendedBy
This ADR is amended by the target.
RelatesTo
This ADR relates to the target.
Custom(String)
Custom link type (for extensibility).
Implementations§
Source§impl LinkKind
impl LinkKind
Sourcepub fn reverse(&self) -> Self
pub fn reverse(&self) -> Self
Get the reverse link kind.
For predefined link types, returns the opposite direction. For custom types, returns the same type (symmetric relation).
§Examples
use adrs_core::LinkKind;
assert_eq!(LinkKind::Supersedes.reverse(), LinkKind::SupersededBy);
assert_eq!(LinkKind::AmendedBy.reverse(), LinkKind::Amends);
assert_eq!(LinkKind::RelatesTo.reverse(), LinkKind::RelatesTo);Trait Implementations§
Source§impl<'de> Deserialize<'de> for LinkKind
impl<'de> Deserialize<'de> for LinkKind
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LinkKind
impl StructuralPartialEq for LinkKind
Auto Trait Implementations§
impl Freeze for LinkKind
impl RefUnwindSafe for LinkKind
impl Send for LinkKind
impl Sync for LinkKind
impl Unpin for LinkKind
impl UnwindSafe for LinkKind
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.