Enum rustc_expand::expand::AstFragment[][src]

pub enum AstFragment {
Show 16 variants OptExpr(Option<P<Expr>>), Expr(P<Expr>), Pat(P<Pat>), Ty(P<Ty>), Stmts(SmallVec<[Stmt; 1]>), Items(SmallVec<[P<Item>; 1]>), TraitItems(SmallVec<[P<AssocItem>; 1]>), ImplItems(SmallVec<[P<AssocItem>; 1]>), ForeignItems(SmallVec<[P<ForeignItem>; 1]>), Arms(SmallVec<[Arm; 1]>), Fields(SmallVec<[ExprField; 1]>), FieldPats(SmallVec<[PatField; 1]>), GenericParams(SmallVec<[GenericParam; 1]>), Params(SmallVec<[Param; 1]>), StructFields(SmallVec<[FieldDef; 1]>), Variants(SmallVec<[Variant; 1]>),
}
Expand description

A fragment of AST that can be produced by a single macro expansion. Can also serve as an input and intermediate result for macro expansion operations.

Variants

OptExpr(Option<P<Expr>>)

Tuple Fields of OptExpr

0: Option<P<Expr>>
Expr(P<Expr>)

Tuple Fields of Expr

0: P<Expr>
Pat(P<Pat>)

Tuple Fields of Pat

0: P<Pat>
Ty(P<Ty>)

Tuple Fields of Ty

0: P<Ty>
Stmts(SmallVec<[Stmt; 1]>)

Tuple Fields of Stmts

0: SmallVec<[Stmt; 1]>
Items(SmallVec<[P<Item>; 1]>)

Tuple Fields of Items

0: SmallVec<[P<Item>; 1]>
TraitItems(SmallVec<[P<AssocItem>; 1]>)

Tuple Fields of TraitItems

0: SmallVec<[P<AssocItem>; 1]>
ImplItems(SmallVec<[P<AssocItem>; 1]>)

Tuple Fields of ImplItems

0: SmallVec<[P<AssocItem>; 1]>
ForeignItems(SmallVec<[P<ForeignItem>; 1]>)

Tuple Fields of ForeignItems

0: SmallVec<[P<ForeignItem>; 1]>
Arms(SmallVec<[Arm; 1]>)

Tuple Fields of Arms

0: SmallVec<[Arm; 1]>
Fields(SmallVec<[ExprField; 1]>)

Tuple Fields of Fields

0: SmallVec<[ExprField; 1]>
FieldPats(SmallVec<[PatField; 1]>)

Tuple Fields of FieldPats

0: SmallVec<[PatField; 1]>
GenericParams(SmallVec<[GenericParam; 1]>)

Tuple Fields of GenericParams

0: SmallVec<[GenericParam; 1]>
Params(SmallVec<[Param; 1]>)

Tuple Fields of Params

0: SmallVec<[Param; 1]>
StructFields(SmallVec<[FieldDef; 1]>)

Tuple Fields of StructFields

0: SmallVec<[FieldDef; 1]>
Variants(SmallVec<[Variant; 1]>)

Tuple Fields of Variants

0: SmallVec<[Variant; 1]>

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 136 bytes

Size for each variant: