Struct sdml_core::model::StructureDef
source · pub struct StructureDef { /* private fields */ }
Expand description
Corresponds to the grammar rule structure_def
.
Implementations§
source§impl StructureDef
impl StructureDef
pub fn new(name: Identifier) -> Self
pub fn with_ts_span(self, ts_span: Span) -> Self
pub fn has_body(&self) -> bool
pub fn body(&self) -> Option<&StructureBody>
pub fn set_body(&mut self, body: StructureBody)
pub fn unset_body(&mut self)
Trait Implementations§
source§impl Clone for StructureDef
impl Clone for StructureDef
source§fn clone(&self) -> StructureDef
fn clone(&self) -> StructureDef
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 StructureDef
impl Debug for StructureDef
source§impl<'de> Deserialize<'de> for StructureDef
impl<'de> Deserialize<'de> for StructureDef
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<StructureDef> for Definition
impl From<StructureDef> for Definition
source§fn from(v: StructureDef) -> Self
fn from(v: StructureDef) -> Self
Converts to this type from the input type.
source§impl ModelElement for StructureDef
impl ModelElement for StructureDef
fn ts_span(&self) -> Option<&Span>
fn set_ts_span(&mut self, span: Span)
fn unset_ts_span(&mut self)
fn name(&self) -> &Identifier
fn set_name(&mut self, name: Identifier)
fn is_complete(&self) -> bool
fn referenced_annotations(&self) -> HashSet<&IdentifierReference>
fn referenced_types(&self) -> HashSet<&IdentifierReference>
fn has_ts_span(&self) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for StructureDef
impl Send for StructureDef
impl Sync for StructureDef
impl Unpin for StructureDef
impl UnwindSafe for StructureDef
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