pub enum StmtKind {
Let(LetStmt),
Assign(AssignStmt),
Expr(Expr),
Return(Option<Expr>),
Break,
Continue,
}Available on crate feature
ast-models only.Expand description
The different kinds of Stmts.
Variants§
Let(LetStmt)
A let or var variable declaration.
Assign(AssignStmt)
An assignment, such as x = 1 or x += 1.
Expr(Expr)
An expression evaluated for its side effects, such as f(); or if c { ... }.
Return(Option<Expr>)
A return statement, with an optional value.
Break
A break statement.
Continue
A continue statement.
Trait Implementations§
impl StructuralPartialEq for StmtKind
Auto Trait Implementations§
impl Forget for StmtKind
impl Freeze for StmtKind
impl RefUnwindSafe for StmtKind
impl Send for StmtKind
impl Sync for StmtKind
impl Unpin for StmtKind
impl UnsafeUnpin for StmtKind
impl UnwindSafe for StmtKind
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