pub struct EntityDef { /* private fields */ }
Expand description
Corresponds to the grammar rule entity_def
.
Implementations§
source§impl EntityDef
impl EntityDef
pub fn new(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 has_body(&self) -> bool
pub fn body(&self) -> Option<&EntityBody>
pub fn set_body(&mut self, body: EntityBody)
pub fn unset_body(&mut self)
Trait Implementations§
source§impl<'de> Deserialize<'de> for EntityDef
impl<'de> Deserialize<'de> for EntityDef
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<EntityDef> for Definition
impl From<EntityDef> for Definition
source§impl ModelElement for EntityDef
impl ModelElement for EntityDef
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 EntityDef
impl Send for EntityDef
impl Sync for EntityDef
impl Unpin for EntityDef
impl UnwindSafe for EntityDef
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