pub enum Stmt {
Expression(Expr),
Assignment {
lhs: Expr,
rhs: Expr,
},
VarDecl {
name: String,
ty: String,
init: Option<Expr>,
},
If {
cond: Expr,
then_stmt: Box<Stmt>,
else_stmt: Option<Box<Stmt>>,
},
For {
init: ForInit,
cond: Expr,
update: Expr,
body: Box<Stmt>,
},
While {
cond: Expr,
body: Box<Stmt>,
},
Block(Vec<Stmt>),
Return(Option<Expr>),
Break,
Continue,
}
Expand description
Statement type
Variants§
Expression(Expr)
Assignment
VarDecl
If
For
While
Block(Vec<Stmt>)
Return(Option<Expr>)
Break
Continue
Trait Implementations§
impl StructuralPartialEq for Stmt
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