pub enum Stmt {
Show 13 variants
Assign {
pat: AssignPattern,
val: Box<Expr>,
nxt: Option<Box<Stmt>>,
},
InPlace {
op: InPlaceOp,
var: Name,
val: Box<Expr>,
nxt: Box<Stmt>,
},
If {
cond: Box<Expr>,
then: Box<Stmt>,
otherwise: Box<Stmt>,
nxt: Option<Box<Stmt>>,
},
Match {
arg: Box<Expr>,
bind: Option<Name>,
arms: Vec<MatchArm>,
nxt: Option<Box<Stmt>>,
},
Switch {
arg: Box<Expr>,
bind: Option<Name>,
arms: Vec<Stmt>,
nxt: Option<Box<Stmt>>,
},
Bend {
bind: Vec<Option<Name>>,
init: Vec<Expr>,
cond: Box<Expr>,
step: Box<Stmt>,
base: Box<Stmt>,
nxt: Option<Box<Stmt>>,
},
Fold {
arg: Box<Expr>,
bind: Option<Name>,
with: Vec<Name>,
arms: Vec<MatchArm>,
nxt: Option<Box<Stmt>>,
},
Do {
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