Enum sdml_core::model::definitions::PropertyRoleDef
source · pub enum PropertyRoleDef {
Identity(EntityIdentityDef),
Member(MemberDef),
}
Variants§
Identity(EntityIdentityDef)
Member(MemberDef)
Implementations§
source§impl PropertyRoleDef
impl PropertyRoleDef
pub const fn is_identity(&self) -> bool
pub const fn as_identity(&self) -> Option<&EntityIdentityDef>
pub const fn is_member(&self) -> bool
pub const fn as_member(&self) -> Option<&MemberDef>
Trait Implementations§
source§impl Clone for PropertyRoleDef
impl Clone for PropertyRoleDef
source§fn clone(&self) -> PropertyRoleDef
fn clone(&self) -> PropertyRoleDef
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 PropertyRoleDef
impl Debug for PropertyRoleDef
source§impl<'de> Deserialize<'de> for PropertyRoleDef
impl<'de> Deserialize<'de> for PropertyRoleDef
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<EntityIdentityDef> for PropertyRoleDef
impl From<EntityIdentityDef> for PropertyRoleDef
source§fn from(value: EntityIdentityDef) -> Self
fn from(value: EntityIdentityDef) -> Self
Converts to this type from the input type.
source§impl From<MemberDef> for PropertyRoleDef
impl From<MemberDef> for PropertyRoleDef
source§impl HasType for PropertyRoleDef
impl HasType for PropertyRoleDef
fn target_type(&self) -> &TypeReference
fn set_target_type(&mut self, target_type: TypeReference)
fn is_unknown_type(&self) -> bool
fn is_named_type(&self) -> bool
fn is_mapping_type(&self) -> bool
source§impl References for PropertyRoleDef
impl References for PropertyRoleDef
fn referenced_types(&self, _names: &mut HashSet<&IdentifierReference>)
fn referenced_annotations(&self, _names: &mut HashSet<&IdentifierReference>)
source§impl Serialize for PropertyRoleDef
impl Serialize for PropertyRoleDef
source§impl Validate for PropertyRoleDef
impl Validate for PropertyRoleDef
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 PropertyRoleDef
impl Send for PropertyRoleDef
impl Sync for PropertyRoleDef
impl Unpin for PropertyRoleDef
impl UnwindSafe for PropertyRoleDef
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