swc_ecma_utils

Trait StmtLike

source
pub trait StmtLike:
    Sized
    + 'static
    + Send
    + Sync
    + From<Stmt> {
    // Required methods
    fn try_into_stmt(self) -> Result<Stmt, Self>;
    fn as_stmt(&self) -> Option<&Stmt>;
    fn as_stmt_mut(&mut self) -> Option<&mut Stmt>;
}

Required Methods§

source

fn try_into_stmt(self) -> Result<Stmt, Self>

source

fn as_stmt(&self) -> Option<&Stmt>

source

fn as_stmt_mut(&mut self) -> Option<&mut Stmt>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StmtLike for ModuleItem

source§

fn try_into_stmt(self) -> Result<Stmt, Self>

source§

fn as_stmt(&self) -> Option<&Stmt>

source§

fn as_stmt_mut(&mut self) -> Option<&mut Stmt>

source§

impl StmtLike for Stmt

source§

fn try_into_stmt(self) -> Result<Stmt, Self>

source§

fn as_stmt(&self) -> Option<&Stmt>

source§

fn as_stmt_mut(&mut self) -> Option<&mut Stmt>

Implementors§