Struct sdml_core::model::ModuleBody
source · pub struct ModuleBody { /* private fields */ }
Expand description
Corresponds the grammar rule module_body
.
Implementations§
source§impl ModuleBody
impl ModuleBody
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_annotations(&self) -> bool
pub fn annotations_len(&self) -> usize
pub fn annotations(&self) -> impl Iterator<Item = &Annotation>
pub fn annotations_mut(&mut self) -> impl Iterator<Item = &mut Annotation>
pub fn add_to_annotations<I>(&mut self, value: I)where I: Into<Annotation>,
pub fn extend_annotations<I>(&mut self, extension: I)where I: IntoIterator<Item = Annotation>,
pub fn annotation_properties(&self) -> impl Iterator<Item = &AnnotationProperty>
pub fn annotation_constraints(&self) -> impl Iterator<Item = &Constraint>
pub fn has_imports(&self) -> bool
pub fn imports_len(&self) -> usize
pub fn imports(&self) -> impl Iterator<Item = &ImportStatement>
pub fn imports_mut(&mut self) -> impl Iterator<Item = &mut ImportStatement>
pub fn add_to_imports(&mut self, value: ImportStatement)
pub fn extend_imports<I>(&mut self, extension: I)where I: IntoIterator<Item = ImportStatement>,
pub fn has_definitions(&self) -> bool
pub fn definitions_len(&self) -> usize
pub fn definitions(&self) -> impl Iterator<Item = &Definition>
pub fn definitions_mut(&mut self) -> impl Iterator<Item = &mut Definition>
pub fn add_to_definitions<I>(&mut self, value: I)where I: Into<Definition>,
pub fn extend_definitions<I>(&mut self, extension: I)where I: IntoIterator<Item = Definition>,
pub fn is_complete(&self) -> bool
pub fn imported_modules(&self) -> HashSet<&Identifier>
pub fn imported_types(&self) -> HashSet<&QualifiedIdentifier>
pub fn defined_names(&self) -> HashSet<&Identifier>
pub fn referenced_types(&self) -> HashSet<&IdentifierReference>
pub fn referenced_annotations(&self) -> HashSet<&IdentifierReference>
Trait Implementations§
source§impl Clone for ModuleBody
impl Clone for ModuleBody
source§fn clone(&self) -> ModuleBody
fn clone(&self) -> ModuleBody
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 ModuleBody
impl Debug for ModuleBody
source§impl Default for ModuleBody
impl Default for ModuleBody
source§fn default() -> ModuleBody
fn default() -> ModuleBody
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ModuleBody
impl<'de> Deserialize<'de> for ModuleBody
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 ModuleBody
impl Send for ModuleBody
impl Sync for ModuleBody
impl Unpin for ModuleBody
impl UnwindSafe for ModuleBody
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