Enum rustc_expand::expand::AstFragment [−][src]
pub enum AstFragment {
Show 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
ForeignItems(SmallVec<[P<ForeignItem>; 1]>)GenericParams(SmallVec<[GenericParam; 1]>)Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AstFragmentimpl !Send for AstFragmentimpl !Sync for AstFragmentimpl Unpin for AstFragmentimpl !UnwindSafe for AstFragmentBlanket Implementations
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