Struct sdml_core::model::definitions::PropertyRole
source · pub struct PropertyRole { /* private fields */ }
Expand description
Corresponds to the grammar rule property_role
.
Implementations§
source§impl PropertyRole
impl PropertyRole
pub fn new<D>(name: Identifier, definition: D) -> Selfwhere
D: Into<PropertyRoleDef>,
pub fn definition(&self) -> &PropertyRoleDef
pub fn set_definition<D>(&mut self, definition: D)where
D: Into<PropertyRoleDef>,
pub fn body(&self) -> Option<&AnnotationOnlyBody>
pub fn target_cardinality(&self) -> &Cardinality
pub fn target_type(&self) -> &TypeReference
Trait Implementations§
source§impl Clone for PropertyRole
impl Clone for PropertyRole
source§fn clone(&self) -> PropertyRole
fn clone(&self) -> PropertyRole
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 PropertyRole
impl Debug for PropertyRole
source§impl<'de> Deserialize<'de> for PropertyRole
impl<'de> Deserialize<'de> for PropertyRole
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 PropertyRole
impl HasName for PropertyRole
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 PropertyRole
impl HasSourceSpan for PropertyRole
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 PropertyRole
impl References for PropertyRole
fn referenced_types<'a>(&'a self, _names: &mut HashSet<&'a IdentifierReference>)
fn referenced_annotations<'a>( &'a self, _names: &mut HashSet<&'a IdentifierReference> )
source§impl Serialize for PropertyRole
impl Serialize for PropertyRole
Auto Trait Implementations§
impl RefUnwindSafe for PropertyRole
impl Send for PropertyRole
impl Sync for PropertyRole
impl Unpin for PropertyRole
impl UnwindSafe for PropertyRole
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