pub enum Definition {
Datatype(DatatypeDef),
Dimension(DimensionDef),
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)
Dimension(DimensionDef)
Entity(EntityDef)
Enum(EnumDef)
Event(EventDef)
Property(PropertyDef)
Rdf(RdfDef)
Structure(StructureDef)
TypeClass(TypeClassDef)
Union(UnionDef)
Implementations§
Source§impl Definition
impl Definition
pub const fn is_datatype(&self) -> bool
pub const fn as_datatype(&self) -> Option<&DatatypeDef>
pub const fn is_dimension(&self) -> bool
pub const fn as_dimension(&self) -> Option<&DimensionDef>
pub const fn is_entity(&self) -> bool
pub const fn as_entity(&self) -> Option<&EntityDef>
pub const fn is_enum(&self) -> bool
pub const fn as_enum(&self) -> Option<&EnumDef>
pub const fn is_event(&self) -> bool
pub const fn as_event(&self) -> Option<&EventDef>
pub const fn is_property(&self) -> bool
pub const fn as_property(&self) -> Option<&PropertyDef>
pub const fn is_rdf(&self) -> bool
pub const fn as_rdf(&self) -> Option<&RdfDef>
pub const fn is_structure(&self) -> bool
pub const fn as_structure(&self) -> Option<&StructureDef>
pub const fn is_type_class(&self) -> bool
pub const fn as_type_class(&self) -> Option<&TypeClassDef>
pub const fn is_union(&self) -> bool
pub const fn as_union(&self) -> Option<&UnionDef>
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 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 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<&DimensionDef> for Definition
impl From<&DimensionDef> for Definition
Source§fn from(v: &DimensionDef) -> Self
fn from(v: &DimensionDef) -> 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 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<DimensionDef> for Definition
impl From<DimensionDef> for Definition
Source§fn from(v: DimensionDef) -> Self
fn from(v: DimensionDef) -> 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: &impl ModuleStore) -> bool
Source§impl References for Definition
impl References for Definition
fn referenced_annotations<'a>( &'a self, names: &mut BTreeSet<&'a IdentifierReference>, )
fn referenced_types<'a>(&'a self, names: &mut BTreeSet<&'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: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
Auto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnsafeUnpin 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