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
- { … }`
- 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.
- Labelled
Block ('label:)? { ... }- Let
- Lit
- Loaded
Mod mod ident { ... }- Local
let pat (:ty)? (= expr)?;- Loop
- MacCall
- Macro
Def - Match
- Method
Call - MutTy
- Param
pat ':' ty- Paren
- PatField
- Path
- Path
Segment - Poly
Trait Ref - Predicate
Lifetime - Predicate
Type - Ptr
- Range
start..endorstart..=end- Ref
- RefPat
('&mut' | '&') pat- RefWith
Inner Attrs - 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::TokenStreamby enabling thequotefeature. - 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
- With
Inner Attrs - Yield
yield expr?
Enums§
- Assoc
Item Kind - Attr
Args - Attr
Kind - Attr
Style - BinOp
Kind - BinOp
Token - Borrow
Kind - Delimiter
- Expr
Kind - Fields
- 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 ',')+ '}'- Visibility
- Visibility
Scope - Where
Predicate
Traits§
- Accessible
- AddVisibility
- Addressable
- Assignable
- Awaitable
- Binary
Operable - Callable
- Castable
- Empty
Item - HasItem
- HasPrecedence
- HasVisibility
- Ident
- Indexable
- Into
Const - Into
Item - Into
Tokens - Into
TryBlock - Into
Unsafe - Maybe
Ident - Method
Callable - Parenthesize
- Returnable
- Semicolon
- Tryable
- Unary
Operable - Yieldable