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 ALL: [EdgeRelation; 15]
pub const ALL: [EdgeRelation; 15]
All 15 canonical relations in ontology-table order.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EdgeRelation
Source§impl Debug for EdgeRelation
impl Debug for EdgeRelation
Source§impl<'de> Deserialize<'de> for EdgeRelation
impl<'de> Deserialize<'de> for EdgeRelation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EdgeRelation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EdgeRelation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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<EdgeRelation, <EdgeRelation as FromStr>::Err>
fn from_str(s: &str) -> Result<EdgeRelation, <EdgeRelation as FromStr>::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
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
self and other values to be equal, and is used by ==.