pub struct MemberDef { /* private fields */ }Expand description
Corresponds to the definition component within grammar rule by_reference_member.
Implementations§
Source§impl MemberDef
impl MemberDef
pub fn new<T>(name: Identifier, target_type: T) -> Selfwhere
T: Into<TypeReference>,
pub const fn new_unknown(name: Identifier) -> Self
pub fn with_target_type(self, target_type: TypeReference) -> Self
pub fn with_target_cardinality(self, target_cardinality: Cardinality) -> Self
pub fn with_body(self, body: AnnotationOnlyBody) -> Self
pub const fn target_type(&self) -> &TypeReference
pub fn set_target_type(&mut self, target_type: TypeReference)
pub const fn target_cardinality(&self) -> &Cardinality
pub fn set_target_cardinality(&mut self, target_cardinality: Cardinality)
Trait Implementations§
Source§impl AnnotationBuilder for MemberDef
impl AnnotationBuilder for MemberDef
fn with_predicate<I, V>(self, predicate: I, value: V) -> Self
fn with_type<I>(self, name: I) -> Self
fn with_super_class<I>(self, name: I) -> Self
fn with_equivalent_class<I>(self, name: I) -> Self
fn with_super_property<I>(self, name: I) -> Self
fn with_domain<I>(self, name: I) -> Self
fn with_comment<S>(self, comment: S) -> Self
fn with_label<S>(self, label: S) -> Self
fn with_see_also_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_see_also(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_see_also_ref<I>(self, resource: I) -> Self
fn with_is_defined_by(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_is_defined_by_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_is_defined_by_ref<I>(self, resource: I) -> Self
fn with_range<I>(self, name: I) -> Self
Source§impl<'de> Deserialize<'de> for MemberDef
impl<'de> Deserialize<'de> for MemberDef
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<&MemberDef> for PropertyDef
impl From<&MemberDef> for PropertyDef
Source§impl From<MemberDef> for MemberKind
impl From<MemberDef> for MemberKind
Source§impl From<MemberDef> for PropertyDef
impl From<MemberDef> for PropertyDef
Source§impl HasCardinality for MemberDef
impl HasCardinality for MemberDef
fn target_cardinality(&self) -> &Cardinality
fn set_target_cardinality(&mut self, target_cardinality: Cardinality)
Source§impl HasName for MemberDef
impl HasName for MemberDef
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 HasOptionalBody for MemberDef
impl HasOptionalBody for MemberDef
Source§type Body = AnnotationOnlyBody
type Body = AnnotationOnlyBody
This type is the particular body for the enclosing type.
fn body(&self) -> Option<&Self::Body>
fn body_mut(&mut self) -> Option<&mut Self::Body>
fn set_body(&mut self, body: Self::Body)
fn unset_body(&mut self)
fn with_body(self, body: Self::Body) -> Selfwhere
Self: Sized,
fn has_body(&self) -> bool
Source§impl HasSourceSpan for MemberDef
impl HasSourceSpan for MemberDef
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 HasType for MemberDef
impl HasType for MemberDef
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 MaybeIncomplete for MemberDef
impl MaybeIncomplete for MemberDef
fn is_incomplete(&self, top: &Module, cache: &impl ModuleStore) -> bool
Source§impl References for MemberDef
impl References for MemberDef
fn referenced_annotations<'a>( &'a self, names: &mut BTreeSet<&'a IdentifierReference>, )
fn referenced_types<'a>(&'a self, names: &mut BTreeSet<&'a IdentifierReference>)
Auto Trait Implementations§
impl Freeze for MemberDef
impl RefUnwindSafe for MemberDef
impl Send for MemberDef
impl Sync for MemberDef
impl Unpin for MemberDef
impl UnsafeUnpin for MemberDef
impl UnwindSafe for MemberDef
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