[−][src]Trait syntax::ext::base::MacResult
The result of a macro expansion. The return values of the various methods are spliced into the AST at the callsite of the macro.
Provided methods
fn make_expr(self: Box<Self>) -> Option<P<Expr>>
Creates an expression.
fn make_items(self: Box<Self>) -> Option<SmallVec<[P<Item>; 1]>>
Creates zero or more items.
fn make_impl_items(self: Box<Self>) -> Option<SmallVec<[ImplItem; 1]>>
Creates zero or more impl items.
fn make_trait_items(self: Box<Self>) -> Option<SmallVec<[TraitItem; 1]>>
Creates zero or more trait items.
fn make_foreign_items(self: Box<Self>) -> Option<SmallVec<[ForeignItem; 1]>>
Creates zero or more items in an extern {}
block
fn make_pat(self: Box<Self>) -> Option<P<Pat>>
Creates a pattern.
fn make_stmts(self: Box<Self>) -> Option<SmallVec<[Stmt; 1]>>
Creates zero or more statements.
By default this attempts to create an expression statement, returning None if that fails.
fn make_ty(self: Box<Self>) -> Option<P<Ty>>
Implementors
impl MacResult for DummyResult
[src]
fn make_expr(self: Box<DummyResult>) -> Option<P<Expr>>
[src]
fn make_pat(self: Box<DummyResult>) -> Option<P<Pat>>
[src]
fn make_items(self: Box<DummyResult>) -> Option<SmallVec<[P<Item>; 1]>>
[src]
fn make_impl_items(self: Box<DummyResult>) -> Option<SmallVec<[ImplItem; 1]>>
[src]
fn make_trait_items(self: Box<DummyResult>) -> Option<SmallVec<[TraitItem; 1]>>
[src]
fn make_foreign_items(self: Box<Self>) -> Option<SmallVec<[ForeignItem; 1]>>
[src]
fn make_stmts(self: Box<DummyResult>) -> Option<SmallVec<[Stmt; 1]>>
[src]
fn make_ty(self: Box<DummyResult>) -> Option<P<Ty>>
[src]
impl MacResult for MacEager
[src]
fn make_expr(self: Box<Self>) -> Option<P<Expr>>
[src]
fn make_items(self: Box<Self>) -> Option<SmallVec<[P<Item>; 1]>>
[src]
fn make_impl_items(self: Box<Self>) -> Option<SmallVec<[ImplItem; 1]>>
[src]
fn make_trait_items(self: Box<Self>) -> Option<SmallVec<[TraitItem; 1]>>
[src]
fn make_foreign_items(self: Box<Self>) -> Option<SmallVec<[ForeignItem; 1]>>
[src]
fn make_stmts(self: Box<Self>) -> Option<SmallVec<[Stmt; 1]>>
[src]
fn make_pat(self: Box<Self>) -> Option<P<Pat>>
[src]
fn make_ty(self: Box<Self>) -> Option<P<Ty>>
[src]
impl<'a> MacResult for ParserAnyMacro<'a>
[src]
fn make_expr(self: Box<ParserAnyMacro<'a>>) -> Option<P<Expr>>
[src]
fn make_pat(self: Box<ParserAnyMacro<'a>>) -> Option<P<Pat>>
[src]
fn make_ty(self: Box<ParserAnyMacro<'a>>) -> Option<P<Ty>>
[src]
fn make_stmts(self: Box<ParserAnyMacro<'a>>) -> Option<SmallVec<[Stmt; 1]>>
[src]
fn make_items(self: Box<ParserAnyMacro<'a>>) -> Option<SmallVec<[P<Item>; 1]>>
[src]
fn make_trait_items(
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[TraitItem; 1]>>
[src]
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[TraitItem; 1]>>
fn make_impl_items(
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[ImplItem; 1]>>
[src]
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[ImplItem; 1]>>
fn make_foreign_items(
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[ForeignItem; 1]>>
[src]
self: Box<ParserAnyMacro<'a>>
) -> Option<SmallVec<[ForeignItem; 1]>>