pub enum Stmt {
Let {
pattern: Pattern,
ty: Option<Type>,
value: Option<Expr>,
span: Span,
},
Expr(Expr),
Return(Option<Expr>, Span),
Break(Option<Expr>, Span),
Continue(Span),
For {
binding: Pattern,
iter: Expr,
body: Block,
span: Span,
},
While {
condition: Expr,
body: Block,
span: Span,
},
Loop {
body: Block,
span: Span,
},
Item(Box<Item>),
}Variants§
Let
let pattern [: Type] = value
Expr(Expr)
Expression statement
Return(Option<Expr>, Span)
return [value]
Break(Option<Expr>, Span)
break [value]
Continue(Span)
continue
For
for binding in iter: body
While
while cond: body
Loop
loop: body
Item(Box<Item>)
Item declaration (nested function, struct, etc.)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnwindSafe for Stmt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more