pub enum Stmt {
Show 15 variants
Compound(CompoundStmt),
Expr(Option<Box<Expr>>, SourceLocation),
If {
cond: Box<Expr>,
then_stmt: Box<Stmt>,
else_stmt: Option<Box<Stmt>>,
loc: SourceLocation,
},
Switch {
expr: Box<Expr>,
body: Box<Stmt>,
loc: SourceLocation,
},
While {
cond: Box<Expr>,
body: Box<Stmt>,
loc: SourceLocation,
},
DoWhile {
body: Box<Stmt>,
cond: Box<Expr>,
loc: SourceLocation,
},
For {
init: Option<ForInit>,
cond: Option<Box<Expr>>,
step: Option<Box<Expr>>,
body: Box<Stmt>,
loc: SourceLocation,
},
Goto(InternedStr, SourceLocation),
Continue(SourceLocation),
Break(SourceLocation),
Return(Option<Box<Expr>>, SourceLocation),
Label {
name: InternedStr,
stmt: Box<Stmt>,
loc: SourceLocation,
},
Case {
expr: Box<Expr>,
stmt: Box<Stmt>,
loc: SourceLocation,
},
Default {
stmt: Box<Stmt>,
loc: SourceLocation,
},
Asm {
loc: SourceLocation,
},
}Expand description
文
Variants§
Compound(CompoundStmt)
複合文
Expr(Option<Box<Expr>>, SourceLocation)
式文
If
if文
Switch
switch文
While
while文
DoWhile
do-while文
For
for文
Fields
§
loc: SourceLocationGoto(InternedStr, SourceLocation)
goto文
Continue(SourceLocation)
continue文
Break(SourceLocation)
break文
Return(Option<Box<Expr>>, SourceLocation)
return文
Label
ラベル文
Case
case文
Default
default文
Asm
asm文
Fields
§
loc: SourceLocationTrait 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 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