pub enum EdgeRelation {
Show 15 variants
Contains,
PartOf,
InstanceOf,
Extends,
VariantOf,
IntroducedBy,
Supersedes,
DerivedFrom,
Precedes,
DependsOn,
Enables,
Implements,
CompetesWith,
ComposedWith,
Annotates,
}Expand description
Closed set of 15 canonical edge relations.
No Default — every edge requires an explicit relation.
Wire format: snake_case strings (e.g. "part_of", "introduced_by").
Variants§
Contains
PartOf
InstanceOf
Extends
VariantOf
IntroducedBy
Supersedes
DerivedFrom
Precedes
DependsOn
Enables
Implements
CompetesWith
ComposedWith
Annotates
Implementations§
Source§impl EdgeRelation
impl EdgeRelation
Sourcepub const VALID_NAMES: &'static [&'static str]
pub const VALID_NAMES: &'static [&'static str]
Valid snake_case names for all 15 canonical relations.
Sourcepub const fn is_symmetric(&self) -> bool
pub const fn is_symmetric(&self) -> bool
true for symmetric relations: edge direction has no semantic meaning.
Sourcepub const fn category(&self) -> EdgeCategory
pub const fn category(&self) -> EdgeCategory
The category this relation belongs to.
Trait Implementations§
Source§impl Clone for EdgeRelation
impl Clone for EdgeRelation
Source§fn clone(&self) -> EdgeRelation
fn clone(&self) -> EdgeRelation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EdgeRelation
Source§impl Debug for EdgeRelation
impl Debug for EdgeRelation
Source§impl Display for EdgeRelation
impl Display for EdgeRelation
impl Eq for EdgeRelation
Source§impl FromStr for EdgeRelation
impl FromStr for EdgeRelation
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse a string into an EdgeRelation.
Accepts the 15 canonical relation names (case-insensitive, with hyphens
normalised to underscores) and also squashed forms that omit the separator
(e.g. "partof", "derivedfrom"). The squashed forms exist for ergonomic
DSL entry; they are not stored on the wire, which always uses the
canonical snake_case form produced by EdgeRelation::as_str.
Source§type Err = UnknownVariant
type Err = UnknownVariant
The associated error which can be returned from parsing.
Source§impl Hash for EdgeRelation
impl Hash for EdgeRelation
Source§impl PartialEq for EdgeRelation
impl PartialEq for EdgeRelation
Source§fn eq(&self, other: &EdgeRelation) -> bool
fn eq(&self, other: &EdgeRelation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EdgeRelation
Auto Trait Implementations§
impl Freeze for EdgeRelation
impl RefUnwindSafe for EdgeRelation
impl Send for EdgeRelation
impl Sync for EdgeRelation
impl Unpin for EdgeRelation
impl UnsafeUnpin for EdgeRelation
impl UnwindSafe for EdgeRelation
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