pub enum Stmt {
Show 13 variants
Assign {
pat: AssignPattern,
val: Box<Expr>,
nxt: Option<Box<Stmt>>,
},
InPlace {
op: InPlaceOp,
pat: Box<AssignPattern>,
val: Box<Expr>,
nxt: Box<Stmt>,
},
If {
cond: Box<Expr>,
then: Box<Stmt>,
otherwise: Box<Stmt>,
nxt: Option<Box<Stmt>>,
},
Match {
arg: Box<Expr>,
bnd: Option<Name>,
with_bnd: Vec<Option<Name>>,
with_arg: Vec<Expr>,
arms: Vec<MatchArm>,
nxt: Option<Box<Stmt>>,
},
Switch {
arg: Box<Expr>,
bnd: Option<Name>,
with_bnd: Vec<Option<Name>>,
with_arg: Vec<Expr>,
arms: Vec<Stmt>,
nxt: Option<Box<Stmt>>,
},
Bend {
bnd: Vec<Option<Name>>,
arg: Vec<Expr>,
cond: Box<Expr>,
step: Box<Stmt>,
base: Box<Stmt>,
nxt: Option<Box<Stmt>>,
},
Fold {
arg: Box<Expr>,
bnd: Option<Name>,
with_bnd: Vec<Option<Name>>,
with_arg: Vec<Expr>,
arms: Vec<MatchArm>,
nxt: Option<Box<Stmt>>,
},
With {
typ: Name,
bod: Box<Stmt>,
nxt: Option<Box<Stmt>>,
},
Ask {
pat: AssignPattern,
val: Box<Expr>,
nxt: Box<Stmt>,
},
Return {
term: Box<Expr>,
},
Open {
typ: Name,
var: Name,
nxt: Box<Stmt>,
},
Use {
nam: Name,
val: Box<Expr>,
nxt: Box<Stmt>,
},
Err,
}Variants§
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more