Struct sdml_core::model::modules::ImportStatement
source · pub struct ImportStatement { /* private fields */ }
Expand description
Corresponds the grammar rule import_statement
.
Implementations§
source§impl ImportStatement
impl ImportStatement
pub fn new(imports: Vec<Import>) -> Self
pub fn has_imports(&self) -> bool
pub fn imports_len(&self) -> usize
pub fn imports(&self) -> impl Iterator<Item = &Import>
pub fn imports_mut(&mut self) -> impl Iterator<Item = &mut Import>
pub fn add_to_imports<I>(&mut self, value: I)where I: Into<Import>,
pub fn extend_imports<I>(&mut self, extension: I)where I: IntoIterator<Item = Import>,
pub fn imported_modules(&self) -> HashSet<&Identifier>
pub fn imported_types(&self) -> HashSet<&QualifiedIdentifier>
Trait Implementations§
source§impl Clone for ImportStatement
impl Clone for ImportStatement
source§fn clone(&self) -> ImportStatement
fn clone(&self) -> ImportStatement
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 ImportStatement
impl Debug for ImportStatement
source§impl Default for ImportStatement
impl Default for ImportStatement
source§fn default() -> ImportStatement
fn default() -> ImportStatement
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ImportStatement
impl<'de> Deserialize<'de> for ImportStatement
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 FromIterator<Import> for ImportStatement
impl FromIterator<Import> for ImportStatement
source§impl HasSourceSpan for ImportStatement
impl HasSourceSpan for ImportStatement
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
Auto Trait Implementations§
impl RefUnwindSafe for ImportStatement
impl Send for ImportStatement
impl Sync for ImportStatement
impl Unpin for ImportStatement
impl UnwindSafe for ImportStatement
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