pub struct RelationDef {
pub name: String,
pub name_zh: Option<String>,
pub target: TypeName,
pub properties: Vec<PropertyDef>,
}Expand description
A relation (edge type) declaration on a SchemaType.
Fields§
§name: StringRelation name as it appears on edges.
name_zh: Option<String>Chinese display name, when the schema source provides one.
target: TypeNameTarget type the relation points at.
properties: Vec<PropertyDef>Properties carried on the edge itself (rare; commonly empty).
Implementations§
Source§impl RelationDef
impl RelationDef
Sourcepub fn properties_lookup(&self) -> BTreeMap<&str, &PropertyDef>
pub fn properties_lookup(&self) -> BTreeMap<&str, &PropertyDef>
The edge-property declarations, keyed by property name.
Trait Implementations§
Source§impl Clone for RelationDef
impl Clone for RelationDef
Source§fn clone(&self) -> RelationDef
fn clone(&self) -> RelationDef
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 moreSource§impl Debug for RelationDef
impl Debug for RelationDef
Source§impl<'de> Deserialize<'de> for RelationDef
impl<'de> Deserialize<'de> for RelationDef
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 RelationDef
Source§impl PartialEq for RelationDef
impl PartialEq for RelationDef
Source§impl Serialize for RelationDef
impl Serialize 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
Mutably borrows from an owned value. Read more