[−][src]Enum swc_ecma_ast::Stmt
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)
A try statement. If handler is null then finalizer must be a BlockStmt.
While(WhileStmt)
DoWhile(DoWhileStmt)
For(ForStmt)
ForIn(ForInStmt)
ForOf(ForOfStmt)
Decl(Decl)
Expr(ExprStmt)
Implementations
impl Stmt
[src]
pub fn is_block(&self) -> bool
[src]
Returns true
if self
is of variant Block
.
pub fn expect_block(self) -> BlockStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Block
.
Panics
Panics if the value is not Block
, with a panic message including the content of self
.
pub fn block(self) -> Option<BlockStmt>
[src]
Returns Some
if self
is of variant Block
, and None
otherwise.
pub fn is_empty(&self) -> bool
[src]
Returns true
if self
is of variant Empty
.
pub fn expect_empty(self) -> EmptyStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Empty
.
Panics
Panics if the value is not Empty
, with a panic message including the content of self
.
pub fn empty(self) -> Option<EmptyStmt>
[src]
Returns Some
if self
is of variant Empty
, and None
otherwise.
pub fn is_debugger(&self) -> bool
[src]
Returns true
if self
is of variant Debugger
.
pub fn expect_debugger(self) -> DebuggerStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Debugger
.
Panics
Panics if the value is not Debugger
, with a panic message including the content of self
.
pub fn debugger(self) -> Option<DebuggerStmt>
[src]
Returns Some
if self
is of variant Debugger
, and None
otherwise.
pub fn is_with(&self) -> bool
[src]
Returns true
if self
is of variant With
.
pub fn expect_with(self) -> WithStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of With
.
Panics
Panics if the value is not With
, with a panic message including the content of self
.
pub fn with(self) -> Option<WithStmt>
[src]
Returns Some
if self
is of variant With
, and None
otherwise.
pub fn is_return_stmt(&self) -> bool
[src]
Returns true
if self
is of variant Return
.
pub fn expect_return_stmt(self) -> ReturnStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Return
.
Panics
Panics if the value is not Return
, with a panic message including the content of self
.
pub fn return_stmt(self) -> Option<ReturnStmt>
[src]
Returns Some
if self
is of variant Return
, and None
otherwise.
pub fn is_labeled(&self) -> bool
[src]
Returns true
if self
is of variant Labeled
.
pub fn expect_labeled(self) -> LabeledStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Labeled
.
Panics
Panics if the value is not Labeled
, with a panic message including the content of self
.
pub fn labeled(self) -> Option<LabeledStmt>
[src]
Returns Some
if self
is of variant Labeled
, and None
otherwise.
pub fn is_break_stmt(&self) -> bool
[src]
Returns true
if self
is of variant Break
.
pub fn expect_break_stmt(self) -> BreakStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Break
.
Panics
Panics if the value is not Break
, with a panic message including the content of self
.
pub fn break_stmt(self) -> Option<BreakStmt>
[src]
Returns Some
if self
is of variant Break
, and None
otherwise.
pub fn is_continue_stmt(&self) -> bool
[src]
Returns true
if self
is of variant Continue
.
pub fn expect_continue_stmt(self) -> ContinueStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Continue
.
Panics
Panics if the value is not Continue
, with a panic message including the content of self
.
pub fn continue_stmt(self) -> Option<ContinueStmt>
[src]
Returns Some
if self
is of variant Continue
, and None
otherwise.
pub fn is_if_stmt(&self) -> bool
[src]
Returns true
if self
is of variant If
.
pub fn expect_if_stmt(self) -> IfStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of If
.
Panics
Panics if the value is not If
, with a panic message including the content of self
.
pub fn if_stmt(self) -> Option<IfStmt>
[src]
Returns Some
if self
is of variant If
, and None
otherwise.
pub fn is_switch(&self) -> bool
[src]
Returns true
if self
is of variant Switch
.
pub fn expect_switch(self) -> SwitchStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Switch
.
Panics
Panics if the value is not Switch
, with a panic message including the content of self
.
pub fn switch(self) -> Option<SwitchStmt>
[src]
Returns Some
if self
is of variant Switch
, and None
otherwise.
pub fn is_throw(&self) -> bool
[src]
Returns true
if self
is of variant Throw
.
pub fn expect_throw(self) -> ThrowStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Throw
.
Panics
Panics if the value is not Throw
, with a panic message including the content of self
.
pub fn throw(self) -> Option<ThrowStmt>
[src]
Returns Some
if self
is of variant Throw
, and None
otherwise.
pub fn is_try_stmt(&self) -> bool
[src]
Returns true
if self
is of variant Try
.
pub fn expect_try_stmt(self) -> TryStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Try
.
Panics
Panics if the value is not Try
, with a panic message including the content of self
.
pub fn try_stmt(self) -> Option<TryStmt>
[src]
Returns Some
if self
is of variant Try
, and None
otherwise.
pub fn is_while_stmt(&self) -> bool
[src]
Returns true
if self
is of variant While
.
pub fn expect_while_stmt(self) -> WhileStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of While
.
Panics
Panics if the value is not While
, with a panic message including the content of self
.
pub fn while_stmt(self) -> Option<WhileStmt>
[src]
Returns Some
if self
is of variant While
, and None
otherwise.
pub fn is_do_while(&self) -> bool
[src]
Returns true
if self
is of variant DoWhile
.
pub fn expect_do_while(self) -> DoWhileStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of DoWhile
.
Panics
Panics if the value is not DoWhile
, with a panic message including the content of self
.
pub fn do_while(self) -> Option<DoWhileStmt>
[src]
Returns Some
if self
is of variant DoWhile
, and None
otherwise.
pub fn is_for_stmt(&self) -> bool
[src]
Returns true
if self
is of variant For
.
pub fn expect_for_stmt(self) -> ForStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of For
.
Panics
Panics if the value is not For
, with a panic message including the content of self
.
pub fn for_stmt(self) -> Option<ForStmt>
[src]
Returns Some
if self
is of variant For
, and None
otherwise.
pub fn is_for_in(&self) -> bool
[src]
Returns true
if self
is of variant ForIn
.
pub fn expect_for_in(self) -> ForInStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ForIn
.
Panics
Panics if the value is not ForIn
, with a panic message including the content of self
.
pub fn for_in(self) -> Option<ForInStmt>
[src]
Returns Some
if self
is of variant ForIn
, and None
otherwise.
pub fn is_for_of(&self) -> bool
[src]
Returns true
if self
is of variant ForOf
.
pub fn expect_for_of(self) -> ForOfStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ForOf
.
Panics
Panics if the value is not ForOf
, with a panic message including the content of self
.
pub fn for_of(self) -> Option<ForOfStmt>
[src]
Returns Some
if self
is of variant ForOf
, and None
otherwise.
pub fn is_decl(&self) -> bool
[src]
Returns true
if self
is of variant Decl
.
pub fn expect_decl(self) -> Decl where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Decl
.
Panics
Panics if the value is not Decl
, with a panic message including the content of self
.
pub fn decl(self) -> Option<Decl>
[src]
Returns Some
if self
is of variant Decl
, and None
otherwise.
pub fn is_expr(&self) -> bool
[src]
Returns true
if self
is of variant Expr
.
pub fn expect_expr(self) -> ExprStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Expr
.
Panics
Panics if the value is not Expr
, with a panic message including the content of self
.
pub fn expr(self) -> Option<ExprStmt>
[src]
Returns Some
if self
is of variant Expr
, and None
otherwise.
Trait Implementations
impl Clone for Stmt
[src]
impl Debug for Stmt
[src]
impl<'de> Deserialize<'de> for Stmt
[src]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for Stmt
[src]
impl From<BlockStmt> for Stmt
[src]
impl From<BreakStmt> for Stmt
[src]
impl From<ContinueStmt> for Stmt
[src]
fn from(v: ContinueStmt) -> Self
[src]
impl From<DebuggerStmt> for Stmt
[src]
fn from(v: DebuggerStmt) -> Self
[src]
impl From<Decl> for Stmt
[src]
impl From<DoWhileStmt> for Stmt
[src]
fn from(v: DoWhileStmt) -> Self
[src]
impl From<EmptyStmt> for Stmt
[src]
impl From<ExprStmt> for Stmt
[src]
impl From<ForInStmt> for Stmt
[src]
impl From<ForOfStmt> for Stmt
[src]
impl From<ForStmt> for Stmt
[src]
impl From<IfStmt> for Stmt
[src]
impl From<LabeledStmt> for Stmt
[src]
fn from(v: LabeledStmt) -> Self
[src]
impl From<ReturnStmt> for Stmt
[src]
fn from(v: ReturnStmt) -> Self
[src]
impl From<Stmt> for ModuleItem
[src]
impl From<SwitchStmt> for Stmt
[src]
fn from(v: SwitchStmt) -> Self
[src]
impl From<ThrowStmt> for Stmt
[src]
impl From<TryStmt> for Stmt
[src]
impl From<WhileStmt> for Stmt
[src]
impl From<WithStmt> for Stmt
[src]
impl Hash for Stmt
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Stmt> for Stmt
[src]
impl Serialize for Stmt
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for Stmt
[src]
impl StructuralEq for Stmt
[src]
impl StructuralPartialEq for Stmt
[src]
Auto Trait Implementations
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnwindSafe for Stmt
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,