pub struct ImportDecl { /* private fields */ }Implementations§
Source§impl ImportDecl
impl ImportDecl
pub fn path(&self) -> Option<Path>
Sourcepub fn doc(&self) -> Option<DocComment>
pub fn doc(&self) -> Option<DocComment>
The leading /// doc comment, if one is attached (B0.6b). No native
HIR field consumes this yet (Import carries no doc, matching the
OLD ink frontend’s own Import shape) — CST-only for now, same
status as SourceFile::doc.
Trait Implementations§
Source§impl AstNode for ImportDecl
impl AstNode for ImportDecl
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 ImportDecl
impl Clone for ImportDecl
Source§fn clone(&self) -> ImportDecl
fn clone(&self) -> ImportDecl
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 ImportDecl
impl Debug for ImportDecl
Source§impl Display for ImportDecl
impl Display for ImportDecl
impl Eq for ImportDecl
Source§impl Hash for ImportDecl
impl Hash for ImportDecl
Source§impl PartialEq for ImportDecl
impl PartialEq for ImportDecl
impl StructuralPartialEq for ImportDecl
Auto Trait Implementations§
impl !RefUnwindSafe for ImportDecl
impl !Send for ImportDecl
impl !Sync for ImportDecl
impl !UnwindSafe for ImportDecl
impl Freeze for ImportDecl
impl Unpin for ImportDecl
impl UnsafeUnpin for ImportDecl
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