[−][src]Enum swc_ecma_ast::ModuleDecl
Variants
Import(ImportDecl)
ExportDecl(ExportDecl)
ExportNamed(NamedExport)
ExportDefaultDecl(ExportDefaultDecl)
ExportDefaultExpr(ExportDefaultExpr)
ExportAll(ExportAll)
TsImportEquals(TsImportEqualsDecl)
TsExportAssignment(TsExportAssignment)
TsNamespaceExport(TsNamespaceExportDecl)
Implementations
impl ModuleDecl
[src]
pub fn is_import(&self) -> bool
[src]
Returns true
if self
is of variant Import
.
pub fn expect_import(self) -> ImportDecl where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Import
.
Panics
Panics if the value is not Import
, with a panic message including the content of self
.
pub fn import(self) -> Option<ImportDecl>
[src]
Returns Some
if self
is of variant Import
, and None
otherwise.
pub fn is_export_decl(&self) -> bool
[src]
Returns true
if self
is of variant ExportDecl
.
pub fn expect_export_decl(self) -> ExportDecl where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn export_decl(self) -> Option<ExportDecl>
[src]
Returns Some
if self
is of variant ExportDecl
, and None
otherwise.
pub fn is_export_named(&self) -> bool
[src]
Returns true
if self
is of variant ExportNamed
.
pub fn expect_export_named(self) -> NamedExport where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn export_named(self) -> Option<NamedExport>
[src]
Returns Some
if self
is of variant ExportNamed
, and None
otherwise.
pub fn is_export_default_decl(&self) -> bool
[src]
Returns true
if self
is of variant ExportDefaultDecl
.
pub fn expect_export_default_decl(self) -> ExportDefaultDecl where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn export_default_decl(self) -> Option<ExportDefaultDecl>
[src]
Returns Some
if self
is of variant ExportDefaultDecl
, and None
otherwise.
pub fn is_export_default_expr(&self) -> bool
[src]
Returns true
if self
is of variant ExportDefaultExpr
.
pub fn expect_export_default_expr(self) -> ExportDefaultExpr where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn export_default_expr(self) -> Option<ExportDefaultExpr>
[src]
Returns Some
if self
is of variant ExportDefaultExpr
, and None
otherwise.
pub fn is_export_all(&self) -> bool
[src]
Returns true
if self
is of variant ExportAll
.
pub fn expect_export_all(self) -> ExportAll where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ExportAll
.
Panics
Panics if the value is not ExportAll
, with a panic message including the content of self
.
pub fn export_all(self) -> Option<ExportAll>
[src]
Returns Some
if self
is of variant ExportAll
, and None
otherwise.
pub fn is_ts_import_equals(&self) -> bool
[src]
Returns true
if self
is of variant TsImportEquals
.
pub fn expect_ts_import_equals(self) -> TsImportEqualsDecl where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn ts_import_equals(self) -> Option<TsImportEqualsDecl>
[src]
Returns Some
if self
is of variant TsImportEquals
, and None
otherwise.
pub fn is_ts_export_assignment(&self) -> bool
[src]
Returns true
if self
is of variant TsExportAssignment
.
pub fn expect_ts_export_assignment(self) -> TsExportAssignment where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn ts_export_assignment(self) -> Option<TsExportAssignment>
[src]
Returns Some
if self
is of variant TsExportAssignment
, and None
otherwise.
pub fn is_ts_namespace_export(&self) -> bool
[src]
Returns true
if self
is of variant TsNamespaceExport
.
pub fn expect_ts_namespace_export(self) -> TsNamespaceExportDecl where
Self: Debug,
[src]
Self: Debug,
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
.
pub fn ts_namespace_export(self) -> Option<TsNamespaceExportDecl>
[src]
Returns Some
if self
is of variant TsNamespaceExport
, and None
otherwise.
Trait Implementations
impl Clone for ModuleDecl
[src]
fn clone(&self) -> ModuleDecl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ModuleDecl
[src]
impl<'de> Deserialize<'de> for ModuleDecl
[src]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for ModuleDecl
[src]
impl From<ExportAll> for ModuleDecl
[src]
impl From<ExportDecl> for ModuleDecl
[src]
fn from(v: ExportDecl) -> Self
[src]
impl From<ExportDefaultDecl> for ModuleDecl
[src]
fn from(v: ExportDefaultDecl) -> Self
[src]
impl From<ExportDefaultExpr> for ModuleDecl
[src]
fn from(v: ExportDefaultExpr) -> Self
[src]
impl From<ImportDecl> for ModuleDecl
[src]
fn from(v: ImportDecl) -> Self
[src]
impl From<ModuleDecl> for ModuleItem
[src]
fn from(v: ModuleDecl) -> Self
[src]
impl From<NamedExport> for ModuleDecl
[src]
fn from(v: NamedExport) -> Self
[src]
impl From<TsExportAssignment> for ModuleDecl
[src]
fn from(v: TsExportAssignment) -> Self
[src]
impl From<TsImportEqualsDecl> for ModuleDecl
[src]
fn from(v: TsImportEqualsDecl) -> Self
[src]
impl From<TsNamespaceExportDecl> for ModuleDecl
[src]
fn from(v: TsNamespaceExportDecl) -> Self
[src]
impl Hash for ModuleDecl
[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<ModuleDecl> for ModuleDecl
[src]
fn eq(&self, other: &ModuleDecl) -> bool
[src]
fn ne(&self, other: &ModuleDecl) -> bool
[src]
impl Serialize for ModuleDecl
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for ModuleDecl
[src]
impl StructuralEq for ModuleDecl
[src]
impl StructuralPartialEq for ModuleDecl
[src]
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
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,