pub enum StatementKind {
Expression(Expression, Span),
Item(Box<Item>),
Block(Block<Statement>),
If {
kw_if: Span,
cond: Parenthesized<Expression>,
if_body: Box<Statement>,
kw_else: Option<Span>,
else_body: Option<Box<Statement>>,
},
While {
kw_while: Span,
cond: Expression,
body: Box<Statement>,
},
For {
kw_for: Span,
init: Option<Box<Item>>,
cond: Option<Expression>,
inc: Option<Expression>,
body: Box<Statement>,
},
Empty(Span),
Break(Span),
Continue(Span),
Return {
kw_ret: Span,
expr: Option<Expression>,
semmicollon: Span,
},
}Variants§
Expression(Expression, Span)
Item(Box<Item>)
Block(Block<Statement>)
If
Fields
§
cond: Parenthesized<Expression>While
For
Empty(Span)
Break(Span)
Continue(Span)
Return
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatementKind
impl RefUnwindSafe for StatementKind
impl Send for StatementKind
impl Sync for StatementKind
impl Unpin for StatementKind
impl UnwindSafe for StatementKind
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