pub enum Stmt {
Show variants
Block(BlockStmt),
Empty(EmptyStmt),
Debugger(DebuggerStmt),
With(WithStmt),
Return(ReturnStmt),
Labeled(LabeledStmt),
Break(BreakStmt),
Continue(ContinueStmt),
If(IfStmt),
Switch(SwitchStmt),
Throw(ThrowStmt),
Try(TryStmt),
While(WhileStmt),
DoWhile(DoWhileStmt),
For(ForStmt),
ForIn(ForInStmt),
ForOf(ForOfStmt),
Decl(Decl),
Expr(ExprStmt),
}
A try statement. If handler is null then finalizer must be a BlockStmt.
Returns true
if self
is of variant Block
.
Unwraps the value, yielding the content of Block
.
Panics if the value is not Block
, with a panic message including the content of self
.
Returns Some
if self
is of variant Block
, and None
otherwise.
Returns true
if self
is of variant Empty
.
Unwraps the value, yielding the content of Empty
.
Panics if the value is not Empty
, with a panic message including the content of self
.
Returns Some
if self
is of variant Empty
, and None
otherwise.
Returns true
if self
is of variant Debugger
.
Unwraps the value, yielding the content of Debugger
.
Panics if the value is not Debugger
, with a panic message including the content of self
.
Returns Some
if self
is of variant Debugger
, and None
otherwise.
Returns true
if self
is of variant With
.
Unwraps the value, yielding the content of With
.
Panics if the value is not With
, with a panic message including the content of self
.
Returns Some
if self
is of variant With
, and None
otherwise.
Returns true
if self
is of variant Return
.
Unwraps the value, yielding the content of Return
.
Panics if the value is not Return
, with a panic message including the content of self
.
Returns Some
if self
is of variant Return
, and None
otherwise.
Returns true
if self
is of variant Labeled
.
Unwraps the value, yielding the content of Labeled
.
Panics if the value is not Labeled
, with a panic message including the content of self
.
Returns Some
if self
is of variant Labeled
, and None
otherwise.
Returns true
if self
is of variant Break
.
Unwraps the value, yielding the content of Break
.
Panics if the value is not Break
, with a panic message including the content of self
.
Returns Some
if self
is of variant Break
, and None
otherwise.
Returns true
if self
is of variant Continue
.
Unwraps the value, yielding the content of Continue
.
Panics if the value is not Continue
, with a panic message including the content of self
.
Returns Some
if self
is of variant Continue
, and None
otherwise.
Returns true
if self
is of variant If
.
Unwraps the value, yielding the content of If
.
Panics if the value is not If
, with a panic message including the content of self
.
Returns Some
if self
is of variant If
, and None
otherwise.
Returns true
if self
is of variant Switch
.
Unwraps the value, yielding the content of Switch
.
Panics if the value is not Switch
, with a panic message including the content of self
.
Returns Some
if self
is of variant Switch
, and None
otherwise.
Returns true
if self
is of variant Throw
.
Unwraps the value, yielding the content of Throw
.
Panics if the value is not Throw
, with a panic message including the content of self
.
Returns Some
if self
is of variant Throw
, and None
otherwise.
Returns true
if self
is of variant Try
.
Unwraps the value, yielding the content of Try
.
Panics if the value is not Try
, with a panic message including the content of self
.
Returns Some
if self
is of variant Try
, and None
otherwise.
Returns true
if self
is of variant While
.
Unwraps the value, yielding the content of While
.
Panics if the value is not While
, with a panic message including the content of self
.
Returns Some
if self
is of variant While
, and None
otherwise.
Returns true
if self
is of variant DoWhile
.
Unwraps the value, yielding the content of DoWhile
.
Panics if the value is not DoWhile
, with a panic message including the content of self
.
Returns Some
if self
is of variant DoWhile
, and None
otherwise.
Returns true
if self
is of variant For
.
Unwraps the value, yielding the content of For
.
Panics if the value is not For
, with a panic message including the content of self
.
Returns Some
if self
is of variant For
, and None
otherwise.
Returns true
if self
is of variant ForIn
.
Unwraps the value, yielding the content of ForIn
.
Panics if the value is not ForIn
, with a panic message including the content of self
.
Returns Some
if self
is of variant ForIn
, and None
otherwise.
Returns true
if self
is of variant ForOf
.
Unwraps the value, yielding the content of ForOf
.
Panics if the value is not ForOf
, with a panic message including the content of self
.
Returns Some
if self
is of variant ForOf
, and None
otherwise.
Returns true
if self
is of variant Decl
.
Unwraps the value, yielding the content of Decl
.
Panics if the value is not Decl
, with a panic message including the content of self
.
Returns Some
if self
is of variant Decl
, and None
otherwise.
Returns true
if self
is of variant Expr
.
Unwraps the value, yielding the content of Expr
.
Panics if the value is not Expr
, with a panic message including the content of self
.
Returns Some
if self
is of variant Expr
, and None
otherwise.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.