pub enum StatementKind<'hir> {
Expr(&'hir Expression<'hir>),
Block(&'hir [Statement<'hir>]),
If {
cond: &'hir Expression<'hir>,
if_true: &'hir Statement<'hir>,
if_false: Option<&'hir Statement<'hir>>,
},
While {
cond: &'hir Expression<'hir>,
body: &'hir Statement<'hir>,
},
For {
init: Option<&'hir Item<'hir>>,
cond: Option<&'hir Expression<'hir>>,
inc: Option<&'hir Expression<'hir>>,
body: &'hir Statement<'hir>,
},
Empty,
Break,
Continue,
Return(Option<&'hir Expression<'hir>>),
Item(&'hir Item<'hir>),
}Variants§
Expr(&'hir Expression<'hir>)
Block(&'hir [Statement<'hir>])
If
Fields
§
cond: &'hir Expression<'hir>While
For
Empty
Break
Continue
Return(Option<&'hir Expression<'hir>>)
Item(&'hir Item<'hir>)
Trait Implementations§
Source§impl<'hir> Clone for StatementKind<'hir>
impl<'hir> Clone for StatementKind<'hir>
Source§fn clone(&self) -> StatementKind<'hir>
fn clone(&self) -> StatementKind<'hir>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'hir> Debug for StatementKind<'hir>
impl<'hir> Debug for StatementKind<'hir>
impl<'hir> Copy for StatementKind<'hir>
Auto Trait Implementations§
impl<'hir> Freeze for StatementKind<'hir>
impl<'hir> !RefUnwindSafe for StatementKind<'hir>
impl<'hir> !Send for StatementKind<'hir>
impl<'hir> !Sync for StatementKind<'hir>
impl<'hir> Unpin for StatementKind<'hir>
impl<'hir> !UnwindSafe for StatementKind<'hir>
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