pub enum StmtKind {
Let {
mutable: bool,
name: Option<Ident>,
ty: Option<Ty>,
value: Expr,
},
Assign {
target: Expr,
op: AssignOp,
value: Expr,
},
While {
cond: Expr,
body: Block,
},
For {
var: Ident,
iter: ForIter,
body: Block,
},
Expr(Expr),
}Expand description
The forms of statements.
Variants§
Let
let x: T = e, var x = e, let _ = e.
Fields
Assign
place op= value
While
while cond { body }
For
for x in mode? collection { body } or for i in a..b { body }.
Expr(Expr)
An expression used as a statement.
Trait Implementations§
impl StructuralPartialEq for StmtKind
Auto Trait Implementations§
impl Freeze for StmtKind
impl RefUnwindSafe for StmtKind
impl Send for StmtKind
impl Sync for StmtKind
impl Unpin for StmtKind
impl UnsafeUnpin for StmtKind
impl UnwindSafe for StmtKind
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