Modules§
Structs§
- AddrOf
&expr
,&mut expr
,&raw const expr
,&raw mut expr
- Arm
- Array
- Assign
lhs = rhs
- Assign
Op lhs op= rhs
- Async
async { ... }
- Attribute
- Attribute
Item - Await
expr.await
- BareFn
- Binary
- Block
('label:)? { ... }
- Break
break ('label)? expr
- Call
- Cast
expr as ty
- Closure
- Compile
Options - Const
- Const
Block - Const
Item const ident: ty (= expr)?;
- Const
Param - Continue
continue ('label)?
- Crate
- Delim
Args - Empty
- EnumDef
- Expr
- Expr
Field ident: expr
- Extern
Block extern unsafe? "abi"? { ... }
- Extern
Crate extern crate ident (as alias)?;
- Field
expr.ident
- Field
Def vis (ident ':')? ty
- Fn
'fn' 'unsafe'? 'const'? 'async'? ('extern' "abi")? ident (<...>)? decl { ... }
- FnDecl
'(' params (, ...)? ')' ('->' output)?
- ForLoop
- Ident
Pat - If
- Impl
- Impl
Trait - Index
expr[index]
- Item
- Item
Index - This index should not be kept after the item is removed.
- Let
- Lit
- Loaded
Mod mod ident { ... }
- Local
let pat (:ty)? (= expr)?;
- Loop
- MacCall
- Macro
Def - Match
- Method
Call - MutTy
- Param
pat ':' ty
- PatField
- Path
- Path
Segment - Poly
Trait Ref - Predicate
Lifetime - Predicate
Type - Ptr
- Range
start..end
orstart..=end
- Ref
- RefPat
('&mut' | '&') pat
- Repeat
[expr; len]
- Return
return expr?
- Semi
expr;
- Static
Item static ident: ty (= expr)?;
- Stmt
Index - This index should not be kept after the statement is removed.
- Struct
- Struct
Def - Struct
Pat - Token
Stream - This structure is not related to
proc_macro2::TokenStream
. However, it can be converted toproc_marco2::TokenStream
by enabling thequote
feature. - Trait
Def - Trait
Object - Try
expr?
- TryBlock
try { ... }
- Tuple
- Tuple
Struct Pat - TyAlias
type ident = ty;
- Type
Ascription expr: ty
- Type
Param - Unary
- Underscore
- Union
Def - Unsafe
Block - Use
use use_tree;
- UsePath
ident '::' tree
- UseRename
ident 'as' alias
- Variant
- While
- Yield
yield expr?
Enums§
- Assoc
Item Kind - Attr
Args - Attr
Kind - BinOp
Kind - BinOp
Token - Borrow
Kind - Delimiter
- Expr
Kind - Generic
Arg - Generic
Bound - Generic
Param - Item
Kind - Keyword
Token - LitKind
- Local
Kind - MacDelimiter
- Mod
mod ident { ... }
ormod ident;
- Mutability
- Operator
Precedence - Pat
- PtrKind
- Range
Limits - Stmt
- Token
- Type
- Unary
OpKind - UseTree
path | use_rename | '*' | '{' (use_tree ',')+ '}'
- Variant
Data - Visibility
- Visibility
Scope - Where
Predicate
Traits§
- Accessible
- AddVisibility
- Addressable
- Assignable
- Awaitable
- Binary
Operable - Callable
- Castable
- Empty
Item - HasItem
- HasPrecedence
- Ident
- Indexable
- Into
Const - Into
Tokens - Into
TryBlock - Into
Unsafe - Maybe
Ident - Method
Callable - Returnable
- Semicolon
- Tryable
- Unary
Operable - Yieldable