pub enum Stmt {
Show 14 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: Option<Box<Stmt>>,
},
Return {
term: Box<Expr>,
},
Open {
typ: Name,
var: Name,
nxt: Box<Stmt>,
},
Use {
nam: Name,
val: Box<Expr>,
nxt: Box<Stmt>,
},
LocalDef {
def: Box<Definition>,
nxt: Box<Stmt>,
},
Err,
}
Variants§
Assign
InPlace
If
Match
Fields
Switch
Fields
Bend
Fields
Fold
Fields
With
Ask
Return
Open
Use
LocalDef
Err
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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