pub enum Stmt {
Show 14 variants
Local {
ty: Option<Type>,
binding: Binding,
value: Option<Expr>,
},
Assign {
place: Expr,
op: Option<BinOp>,
value: Expr,
},
If {
cond: Expr,
then: Box<Stmt>,
otherwise: Option<Box<Stmt>>,
},
Foreach {
ty: Option<Type>,
binding: Binding,
iter: Expr,
body: Box<Stmt>,
},
For {
init: Option<Box<Stmt>>,
cond: Option<Expr>,
step: Option<Box<Stmt>>,
body: Box<Stmt>,
},
While {
cond: Expr,
body: Box<Stmt>,
},
DoWhile {
body: Box<Stmt>,
cond: Expr,
},
Block(Block),
Break(Span),
Continue(Span),
Return(Option<Expr>, Span),
Skip(Option<Expr>, Span),
Expr(Expr),
Value(Expr),
}Variants§
Local
var x = …;, int x;, var (a, b) = …;; ty None: var.
Assign
place op= value;; op None for =.
If
Foreach
For
While
DoWhile
Block(Block)
Break(Span)
Continue(Span)
Return(Option<Expr>, Span)
Skip(Option<Expr>, Span)
skip value; in a patch’s before: the method ends with it.
Expr(Expr)
Value(Expr)
A block lambda’s last expression, without ;: its value.
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 UnsafeUnpin 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