pub struct NodeTypeDef {
pub description: Option<String>,
pub properties: BTreeMap<String, PropertyDef>,
pub subtypes: Option<BTreeMap<String, SubtypeDef>>,
pub parent_type: Option<String>,
}Expand description
Definition of a node type in the ontology.
If subtypes is Some, then add_node requires a subtype parameter
and properties are validated against the subtype’s definition.
If subtypes is None, the type works as before (D-024 backward compat).
Fields§
§description: Option<String>§properties: BTreeMap<String, PropertyDef>§subtypes: Option<BTreeMap<String, SubtypeDef>>Optional subtype definitions. When present, add_node must specify
a subtype and properties are validated per-subtype (D-024).
parent_type: Option<String>RDFS-level class hierarchy (Step 2). If set, this type is a subclass
of parent_type. Queries for the parent type include this type.
Edge constraints accepting the parent type also accept this type.
Properties are inherited from the parent (child overrides on conflict).
Trait Implementations§
Source§impl Clone for NodeTypeDef
impl Clone for NodeTypeDef
Source§fn clone(&self) -> NodeTypeDef
fn clone(&self) -> NodeTypeDef
Returns a duplicate of the value. Read more
1.0.0 · 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 NodeTypeDef
impl Debug for NodeTypeDef
Source§impl<'de> Deserialize<'de> for NodeTypeDef
impl<'de> Deserialize<'de> for NodeTypeDef
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
Source§impl PartialEq for NodeTypeDef
impl PartialEq for NodeTypeDef
Source§impl Serialize for NodeTypeDef
impl Serialize for NodeTypeDef
impl StructuralPartialEq for NodeTypeDef
Auto Trait Implementations§
impl Freeze for NodeTypeDef
impl RefUnwindSafe for NodeTypeDef
impl Send for NodeTypeDef
impl Sync for NodeTypeDef
impl Unpin for NodeTypeDef
impl UnsafeUnpin for NodeTypeDef
impl UnwindSafe for NodeTypeDef
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