pub trait HasAttrs: AstNode {
// Provided methods
fn attrs(&self) -> AstChildren<Attr> ⓘ { ... }
fn doc_comments(&self) -> AstChildren<DocComment> ⓘ { ... }
fn attrs_with_doc(&self) -> AstChildren<AnyAttr> ⓘ { ... }
fn inner_attributes_node(&self) -> Option<SyntaxNode> { ... }
}Provided Methods§
fn attrs(&self) -> AstChildren<Attr> ⓘ
fn doc_comments(&self) -> AstChildren<DocComment> ⓘ
fn attrs_with_doc(&self) -> AstChildren<AnyAttr> ⓘ
Sourcefn inner_attributes_node(&self) -> Option<SyntaxNode>
fn inner_attributes_node(&self) -> Option<SyntaxNode>
This may return the same node as called with (with SourceFile). The caller has the responsibility
to avoid duplicate attributes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".