Enum sdml_core::model::definitions::Definition
source · pub enum Definition {
Datatype(DatatypeDef),
Entity(EntityDef),
Enum(EnumDef),
Event(EventDef),
Property(PropertyDef),
Rdf(RdfDef),
Structure(StructureDef),
TypeClass(TypeClassDef),
Union(UnionDef),
}
Expand description
Corresponds to the grammar rule type_def
.
Variants§
Datatype(DatatypeDef)
Entity(EntityDef)
Enum(EnumDef)
Event(EventDef)
Property(PropertyDef)
Rdf(RdfDef)
Structure(StructureDef)
TypeClass(TypeClassDef)
Union(UnionDef)
Implementations§
source§impl Definition
impl Definition
pub fn is_datatype(&self) -> bool
pub fn is_structured_type(&self) -> bool
pub fn is_type(&self) -> bool
pub fn is_library_definition(&self) -> bool
Trait Implementations§
source§impl Clone for Definition
impl Clone for Definition
source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
Returns a copy 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 Definition
impl Debug for Definition
source§impl<'de> Deserialize<'de> for Definition
impl<'de> Deserialize<'de> for Definition
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 From<DatatypeDef> for Definition
impl From<DatatypeDef> for Definition
source§fn from(v: DatatypeDef) -> Self
fn from(v: DatatypeDef) -> Self
Converts to this type from the input type.
source§impl From<EntityDef> for Definition
impl From<EntityDef> for Definition
source§impl From<EnumDef> for Definition
impl From<EnumDef> for Definition
source§impl From<EventDef> for Definition
impl From<EventDef> for Definition
source§impl From<PropertyDef> for Definition
impl From<PropertyDef> for Definition
source§fn from(v: PropertyDef) -> Self
fn from(v: PropertyDef) -> Self
Converts to this type from the input type.
source§impl From<RdfDef> for Definition
impl From<RdfDef> for Definition
source§impl From<StructureDef> for Definition
impl From<StructureDef> for Definition
source§fn from(v: StructureDef) -> Self
fn from(v: StructureDef) -> Self
Converts to this type from the input type.
source§impl From<TypeClassDef> for Definition
impl From<TypeClassDef> for Definition
source§fn from(v: TypeClassDef) -> Self
fn from(v: TypeClassDef) -> Self
Converts to this type from the input type.
source§impl From<UnionDef> for Definition
impl From<UnionDef> for Definition
source§impl HasName for Definition
impl HasName for Definition
source§fn name(&self) -> &Identifier
fn name(&self) -> &Identifier
Get the name of the enclosing type.
source§fn set_name(&mut self, name: Identifier)
fn set_name(&mut self, name: Identifier)
Set the name of the enclosing type.
source§impl HasSourceSpan for Definition
impl HasSourceSpan for Definition
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
source§impl MaybeIncomplete for Definition
impl MaybeIncomplete for Definition
fn is_incomplete(&self, top: &Module, cache: &ModuleCache) -> bool
source§impl References for Definition
impl References for Definition
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference> )
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
source§impl Serialize for Definition
impl Serialize for Definition
source§impl Validate for Definition
impl Validate for Definition
fn validate( &self, top: &Module, cache: &ModuleCache, loader: &impl ModuleLoader, check_constraints: bool )
Auto Trait Implementations§
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
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