pub struct RelationDef {
pub cardinality: Option<Cardinality>,
pub inverse: Option<String>,
pub means: Option<String>,
}Expand description
A relation definition declared in a config’s relations block — the
structural half of an entry, parallel to the reference-style half
(RelationStyleConfig). This is what makes a workspace’s vocabulary
self-describing (DESIGN §1, the prov/1 spec): a foreign reader learns
the graph — which fields are relations, their inverse, their cardinality —
from the document itself rather than assuming prov’s contents/part_of
preset. Each field is optional; a relations entry may carry only style, only
definition, or both.
Fields§
§cardinality: Option<Cardinality>How many targets the field may hold (one / many). None leaves the
relation’s cardinality to whatever the built RelationSet defaults it to
(many, the permissive choice) when this def creates the relation.
inverse: Option<String>The reciprocal relation’s field name, bidirectionally maintained.
means: Option<String>A free-form, human-facing gloss of what the relation means. prov never reads this back (DESIGN §2, tier 3) — it is documentation that travels with the data so a person reading the frontmatter learns the vocabulary too.
Trait Implementations§
Source§impl Clone for RelationDef
impl Clone for RelationDef
Source§fn clone(&self) -> RelationDef
fn clone(&self) -> RelationDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelationDef
impl Debug for RelationDef
Source§impl Default for RelationDef
impl Default for RelationDef
Source§fn default() -> RelationDef
fn default() -> RelationDef
impl Eq for RelationDef
Source§impl PartialEq for RelationDef
impl PartialEq for RelationDef
impl StructuralPartialEq for RelationDef
Auto Trait Implementations§
impl Freeze for RelationDef
impl RefUnwindSafe for RelationDef
impl Send for RelationDef
impl Sync for RelationDef
impl Unpin for RelationDef
impl UnsafeUnpin for RelationDef
impl UnwindSafe for RelationDef
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> 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.