Enum swc_ecma_ast::ExportSpecifier
source · [−]pub enum ExportSpecifier {
Namespace(ExportNamespaceSpecifier),
Default(ExportDefaultSpecifier),
Named(ExportNamedSpecifier),
}
Variants
Namespace(ExportNamespaceSpecifier)
Default(ExportDefaultSpecifier)
Named(ExportNamedSpecifier)
Implementations
sourceimpl ExportSpecifier
impl ExportSpecifier
sourcepub fn is_namespace(&self) -> bool
pub fn is_namespace(&self) -> bool
Returns true
if self
is of variant Namespace
.
sourcepub fn as_namespace(&self) -> Option<&ExportNamespaceSpecifier>
pub fn as_namespace(&self) -> Option<&ExportNamespaceSpecifier>
Returns Some
if self
is a reference of variant Namespace
, and None
otherwise.
sourcepub fn as_mut_namespace(&mut self) -> Option<&mut ExportNamespaceSpecifier>
pub fn as_mut_namespace(&mut self) -> Option<&mut ExportNamespaceSpecifier>
Returns Some
if self
is a mutable reference of variant Namespace
, and None
otherwise.
sourcepub fn expect_namespace(self) -> ExportNamespaceSpecifierwhere
Self: Debug,
pub fn expect_namespace(self) -> ExportNamespaceSpecifierwhere
Self: Debug,
sourcepub fn namespace(self) -> Option<ExportNamespaceSpecifier>
pub fn namespace(self) -> Option<ExportNamespaceSpecifier>
Returns Some
if self
is of variant Namespace
, and None
otherwise.
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true
if self
is of variant Default
.
sourcepub fn as_default(&self) -> Option<&ExportDefaultSpecifier>
pub fn as_default(&self) -> Option<&ExportDefaultSpecifier>
Returns Some
if self
is a reference of variant Default
, and None
otherwise.
sourcepub fn as_mut_default(&mut self) -> Option<&mut ExportDefaultSpecifier>
pub fn as_mut_default(&mut self) -> Option<&mut ExportDefaultSpecifier>
Returns Some
if self
is a mutable reference of variant Default
, and None
otherwise.
sourcepub fn expect_default(self) -> ExportDefaultSpecifierwhere
Self: Debug,
pub fn expect_default(self) -> ExportDefaultSpecifierwhere
Self: Debug,
sourcepub fn default(self) -> Option<ExportDefaultSpecifier>
pub fn default(self) -> Option<ExportDefaultSpecifier>
Returns Some
if self
is of variant Default
, and None
otherwise.
sourcepub fn as_named(&self) -> Option<&ExportNamedSpecifier>
pub fn as_named(&self) -> Option<&ExportNamedSpecifier>
Returns Some
if self
is a reference of variant Named
, and None
otherwise.
sourcepub fn as_mut_named(&mut self) -> Option<&mut ExportNamedSpecifier>
pub fn as_mut_named(&mut self) -> Option<&mut ExportNamedSpecifier>
Returns Some
if self
is a mutable reference of variant Named
, and None
otherwise.
sourcepub fn expect_named(self) -> ExportNamedSpecifierwhere
Self: Debug,
pub fn expect_named(self) -> ExportNamedSpecifierwhere
Self: Debug,
sourcepub fn named(self) -> Option<ExportNamedSpecifier>
pub fn named(self) -> Option<ExportNamedSpecifier>
Returns Some
if self
is of variant Named
, and None
otherwise.
Trait Implementations
sourceimpl Clone for ExportSpecifier
impl Clone for ExportSpecifier
sourcefn clone(&self) -> ExportSpecifier
fn clone(&self) -> ExportSpecifier
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more