Struct aster::stmt::StmtBuilder [] [src]

pub struct StmtBuilder<F = Identity> {
    // some fields omitted
}

Methods

impl StmtBuilder

fn new() -> StmtBuilder

impl<F> StmtBuilder<F> where F: Invoke<P<Stmt>>

fn new_with_callback(callback: F) -> Self

fn build(self, stmt: P<Stmt>) -> F::Result

fn span(self, span: Span) -> Self

fn build_stmt_(self, stmt_: Stmt_) -> F::Result

fn build_let(self, pat: P<Pat>, ty: Option<P<Ty>>, init: Option<P<Expr>>) -> F::Result

fn let_(self) -> PatBuilder<Self>

fn let_id<I>(self, id: I) -> ExprBuilder<StmtLetIdBuilder<F>> where I: ToIdent

fn build_expr(self, expr: P<Expr>) -> F::Result

fn expr(self) -> ExprBuilder<StmtExprBuilder<F>>

fn semi(self) -> ExprBuilder<StmtSemiBuilder<F>>

fn build_item(self, item: P<Item>) -> F::Result

fn item(self) -> ItemBuilder<StmtItemBuilder<F>>

Trait Implementations

impl<F> Invoke<P<Pat>> for StmtBuilder<F> where F: Invoke<P<Stmt>>

type Result = StmtLetBuilder<F>

fn invoke(self, pat: P<Pat>) -> StmtLetBuilder<F>