pub struct ModuleDecl { /* private fields */ }Implementations§
Source§impl ModuleDecl
impl ModuleDecl
pub fn name_token(&self) -> Option<SyntaxToken>
pub fn body(&self) -> Option<Block>
Sourcepub fn doc(&self) -> Option<DocComment>
pub fn doc(&self) -> Option<DocComment>
See ImportDecl::doc — no native HIR “module container” node
exists yet either (lower_native’s module doc, judgment call #4).
Trait Implementations§
Source§impl AstNode for ModuleDecl
impl AstNode for ModuleDecl
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true for a node with a SyntaxKind this type can wrap.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.Source§impl Clone for ModuleDecl
impl Clone for ModuleDecl
Source§fn clone(&self) -> ModuleDecl
fn clone(&self) -> ModuleDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModuleDecl
impl Debug for ModuleDecl
Source§impl Display for ModuleDecl
impl Display for ModuleDecl
impl Eq for ModuleDecl
Source§impl Hash for ModuleDecl
impl Hash for ModuleDecl
Source§impl PartialEq for ModuleDecl
impl PartialEq for ModuleDecl
impl StructuralPartialEq for ModuleDecl
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleDecl
impl !Send for ModuleDecl
impl !Sync for ModuleDecl
impl !UnwindSafe for ModuleDecl
impl Freeze for ModuleDecl
impl Unpin for ModuleDecl
impl UnsafeUnpin for ModuleDecl
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