Struct sdml_core::model::definitions::EntityIdentity
source · pub struct EntityIdentity { /* private fields */ }
Expand description
Corresponds to the grammar rules member
and entity_identity
.
Implementations§
source§impl EntityIdentity
impl EntityIdentity
pub fn new_property_reference( role: Identifier, in_property: IdentifierReference ) -> Self
pub fn new_definition(name: Identifier, definition: EntityIdentityDef) -> Self
pub fn is_property_reference(&self) -> bool
pub fn as_property_reference(&self) -> Option<&IdentifierReference>
pub fn is_definition(&self) -> bool
pub fn as_definition(&self) -> Option<&EntityIdentityDef>
Trait Implementations§
source§impl Clone for EntityIdentity
impl Clone for EntityIdentity
source§fn clone(&self) -> EntityIdentity
fn clone(&self) -> EntityIdentity
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 EntityIdentity
impl Debug for EntityIdentity
source§impl<'de> Deserialize<'de> for EntityIdentity
impl<'de> Deserialize<'de> for EntityIdentity
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 HasName for EntityIdentity
impl HasName for EntityIdentity
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 EntityIdentity
impl HasSourceSpan for EntityIdentity
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 References for EntityIdentity
impl References for EntityIdentity
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 EntityIdentity
impl Serialize for EntityIdentity
source§impl Validate for EntityIdentity
impl Validate for EntityIdentity
fn is_complete(&self, top: &Module, cache: &ModuleCache) -> Result<bool, Error>
fn is_valid( &self, check_constraints: bool, top: &Module, cache: &ModuleCache ) -> Result<bool, Error>
fn validate( &self, check_constraints: bool, top: &Module, cache: &ModuleCache, errors: &mut Vec<Error> ) -> Result<(), Error>
Auto Trait Implementations§
impl RefUnwindSafe for EntityIdentity
impl Send for EntityIdentity
impl Sync for EntityIdentity
impl Unpin for EntityIdentity
impl UnwindSafe for EntityIdentity
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