Struct sdml_core::model::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(name: Identifier, target_type: TypeReference) -> Self
pub fn new_unknown(name: Identifier) -> Self
pub fn with_ts_span(self, ts_span: Span) -> Self
pub fn has_ts_span(&self) -> bool
pub fn ts_span(&self) -> Option<&Span>
pub fn set_ts_span(&mut self, span: Span)
pub fn unset_ts_span(&mut self)
pub fn name(&self) -> &Identifier
pub fn set_name(&mut self, name: Identifier)
pub fn target_type(&self) -> &TypeReference
pub fn set_target_type(&mut self, target_type: TypeReference)
pub fn has_inverse_name(&self) -> bool
pub fn inverse_name(&self) -> Option<&Option<Identifier>>
pub fn set_inverse_name(&mut self, inverse_name: Option<Identifier>)
pub fn unset_inverse_name(&mut self)
pub fn has_target_cardinality(&self) -> bool
pub fn target_cardinality(&self) -> Option<&Cardinality>
pub fn set_target_cardinality(&mut self, target_cardinality: Cardinality)
pub fn unset_target_cardinality(&mut self)
pub fn has_body(&self) -> bool
pub fn body(&self) -> Option<&AnnotationOnlyBody>
pub fn set_body(&mut self, body: AnnotationOnlyBody)
pub fn unset_body(&mut self)
pub fn referenced_annotations(&self) -> HashSet<&IdentifierReference>
pub fn referenced_types(&self) -> HashSet<&IdentifierReference>
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
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