Enum swc_ecma_ast::ModuleDecl [−][src]
pub enum ModuleDecl {
Import(ImportDecl),
ExportDecl(ExportDecl),
ExportNamed(NamedExport),
ExportDefaultDecl(ExportDefaultDecl),
ExportDefaultExpr(ExportDefaultExpr),
ExportAll(ExportAll),
TsImportEquals(TsImportEqualsDecl),
TsExportAssignment(TsExportAssignment),
TsNamespaceExport(TsNamespaceExportDecl),
}
Variants
Import(ImportDecl)
Tuple Fields of Import
0: ImportDecl
ExportDecl(ExportDecl)
Tuple Fields of ExportDecl
0: ExportDecl
ExportNamed(NamedExport)
Tuple Fields of ExportNamed
0: NamedExport
ExportDefaultDecl(ExportDefaultDecl)
Tuple Fields of ExportDefaultDecl
ExportDefaultExpr(ExportDefaultExpr)
Tuple Fields of ExportDefaultExpr
ExportAll(ExportAll)
Tuple Fields of ExportAll
0: ExportAll
TsImportEquals(TsImportEqualsDecl)
Tuple Fields of TsImportEquals
TsExportAssignment(TsExportAssignment)
Tuple Fields of TsExportAssignment
TsNamespaceExport(TsNamespaceExportDecl)
Tuple Fields of TsNamespaceExport
Implementations
Returns Some
if self
is of variant Import
, and None
otherwise.
Returns true
if self
is of variant ExportDecl
.
Unwraps the value, yielding the content of ExportDecl
.
Panics
Panics if the value is not ExportDecl
, with a panic message including the content of self
.
Returns Some
if self
is of variant ExportDecl
, and None
otherwise.
Returns true
if self
is of variant ExportNamed
.
Unwraps the value, yielding the content of ExportNamed
.
Panics
Panics if the value is not ExportNamed
, with a panic message including the content of self
.
Returns Some
if self
is of variant ExportNamed
, and None
otherwise.
Returns true
if self
is of variant ExportDefaultDecl
.
Unwraps the value, yielding the content of ExportDefaultDecl
.
Panics
Panics if the value is not ExportDefaultDecl
, with a panic message including the content of self
.
Returns Some
if self
is of variant ExportDefaultDecl
, and None
otherwise.
Returns true
if self
is of variant ExportDefaultExpr
.
Unwraps the value, yielding the content of ExportDefaultExpr
.
Panics
Panics if the value is not ExportDefaultExpr
, with a panic message including the content of self
.
Returns Some
if self
is of variant ExportDefaultExpr
, and None
otherwise.
Returns true
if self
is of variant ExportAll
.
Returns Some
if self
is of variant ExportAll
, and None
otherwise.
Returns true
if self
is of variant TsImportEquals
.
Unwraps the value, yielding the content of TsImportEquals
.
Panics
Panics if the value is not TsImportEquals
, with a panic message including the content of self
.
Returns Some
if self
is of variant TsImportEquals
, and None
otherwise.
Returns true
if self
is of variant TsExportAssignment
.
Unwraps the value, yielding the content of TsExportAssignment
.
Panics
Panics if the value is not TsExportAssignment
, with a panic message including the content of self
.
Returns Some
if self
is of variant TsExportAssignment
, and None
otherwise.
Returns true
if self
is of variant TsNamespaceExport
.
Unwraps the value, yielding the content of TsNamespaceExport
.
Panics
Panics if the value is not TsNamespaceExport
, with a panic message including the content of self
.
Returns Some
if self
is of variant TsNamespaceExport
, and None
otherwise.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ModuleDecl
impl Send for ModuleDecl
impl Sync for ModuleDecl
impl Unpin for ModuleDecl
impl UnwindSafe for ModuleDecl
Blanket Implementations
Mutably borrows from an owned value. Read more