syntax::ast

Trait HasAttrs

source
pub trait HasAttrs: AstNode {
    // Provided methods
    fn attrs(&self) -> AstChildren<Attr>  { ... }
    fn has_atom_attr(&self, atom: &str) -> bool { ... }
    fn attrs_including_inner(self) -> impl Iterator<Item = Attr>
       where Self: Sized { ... }
}

Provided Methods§

source

fn attrs(&self) -> AstChildren<Attr>

source

fn has_atom_attr(&self, atom: &str) -> bool

source

fn attrs_including_inner(self) -> impl Iterator<Item = Attr>
where Self: Sized,

Returns all attributes of this node, including inner attributes that may not be directly under this node but under a child.

Implementations on Foreign Types§

source§

impl<L, R> HasAttrs for Either<L, R>
where L: HasAttrs, R: HasAttrs,

Implementors§

source§

impl HasAttrs for Adt

source§

impl HasAttrs for AssocItem

source§

impl HasAttrs for CallableExpr

source§

impl HasAttrs for Expr

source§

impl HasAttrs for ExternItem

source§

impl HasAttrs for GenericParam

source§

impl HasAttrs for Item

source§

impl HasAttrs for Macro

source§

impl HasAttrs for TraitOrAlias

source§

impl HasAttrs for TypeOrConstParam

source§

impl HasAttrs for AnyHasAttrs

source§

impl HasAttrs for AnyHasDocComments

source§

impl HasAttrs for ArrayExpr

source§

impl HasAttrs for AsmExpr

source§

impl HasAttrs for AssocItemList

source§

impl HasAttrs for AwaitExpr

source§

impl HasAttrs for BecomeExpr

source§

impl HasAttrs for BinExpr

source§

impl HasAttrs for BlockExpr

source§

impl HasAttrs for BreakExpr

source§

impl HasAttrs for CallExpr

source§

impl HasAttrs for CastExpr

source§

impl HasAttrs for ClosureExpr

source§

impl HasAttrs for Const

source§

impl HasAttrs for ConstParam

source§

impl HasAttrs for ContinueExpr

source§

impl HasAttrs for Enum

source§

impl HasAttrs for ExternBlock

source§

impl HasAttrs for ExternCrate

source§

impl HasAttrs for ExternItemList

source§

impl HasAttrs for FieldExpr

source§

impl HasAttrs for Fn

source§

impl HasAttrs for ForExpr

source§

impl HasAttrs for FormatArgsExpr

source§

impl HasAttrs for IdentPat

source§

impl HasAttrs for IfExpr

source§

impl HasAttrs for Impl

source§

impl HasAttrs for IndexExpr

source§

impl HasAttrs for ItemList

source§

impl HasAttrs for LetExpr

source§

impl HasAttrs for LetStmt

source§

impl HasAttrs for LifetimeParam

source§

impl HasAttrs for Literal

source§

impl HasAttrs for LoopExpr

source§

impl HasAttrs for MacroCall

source§

impl HasAttrs for MacroDef

source§

impl HasAttrs for MacroRules

source§

impl HasAttrs for MatchArm

source§

impl HasAttrs for MatchArmList

source§

impl HasAttrs for MatchExpr

source§

impl HasAttrs for MethodCallExpr

source§

impl HasAttrs for Module

source§

impl HasAttrs for OffsetOfExpr

source§

impl HasAttrs for Param

source§

impl HasAttrs for ParenExpr

source§

impl HasAttrs for PathExpr

source§

impl HasAttrs for PrefixExpr

source§

impl HasAttrs for RangeExpr

source§

impl HasAttrs for RecordExprField

source§

impl HasAttrs for RecordExprFieldList

source§

impl HasAttrs for RecordField

source§

impl HasAttrs for RecordPatField

source§

impl HasAttrs for RefExpr

source§

impl HasAttrs for RestPat

source§

impl HasAttrs for ReturnExpr

source§

impl HasAttrs for SelfParam

source§

impl HasAttrs for SourceFile

source§

impl HasAttrs for Static

source§

impl HasAttrs for StmtList

source§

impl HasAttrs for Struct

source§

impl HasAttrs for Trait

source§

impl HasAttrs for TraitAlias

source§

impl HasAttrs for TryExpr

source§

impl HasAttrs for TupleExpr

source§

impl HasAttrs for TupleField

source§

impl HasAttrs for TypeAlias

source§

impl HasAttrs for TypeParam

source§

impl HasAttrs for UnderscoreExpr

source§

impl HasAttrs for Union

source§

impl HasAttrs for Use

source§

impl HasAttrs for Variant

source§

impl HasAttrs for WhileExpr

source§

impl HasAttrs for YeetExpr

source§

impl HasAttrs for YieldExpr