Enum swc_ecma_ast::TsModuleRef
source · [−]pub enum TsModuleRef {
TsEntityName(TsEntityName),
TsExternalModuleRef(TsExternalModuleRef),
}
Variants
TsEntityName(TsEntityName)
TsExternalModuleRef(TsExternalModuleRef)
Implementations
sourceimpl TsModuleRef
impl TsModuleRef
sourcepub fn is_ts_entity_name(&self) -> bool
pub fn is_ts_entity_name(&self) -> bool
Returns true
if self
is of variant TsEntityName
.
sourcepub fn as_ts_entity_name(&self) -> Option<&TsEntityName>
pub fn as_ts_entity_name(&self) -> Option<&TsEntityName>
Returns Some
if self
is a reference of variant TsEntityName
, and None
otherwise.
sourcepub fn as_mut_ts_entity_name(&mut self) -> Option<&mut TsEntityName>
pub fn as_mut_ts_entity_name(&mut self) -> Option<&mut TsEntityName>
Returns Some
if self
is a mutable reference of variant TsEntityName
, and None
otherwise.
sourcepub fn expect_ts_entity_name(self) -> TsEntityNamewhere
Self: Debug,
pub fn expect_ts_entity_name(self) -> TsEntityNamewhere
Self: Debug,
Unwraps the value, yielding the content of TsEntityName
.
Panics
Panics if the value is not TsEntityName
, with a panic message including the content of self
.
sourcepub fn ts_entity_name(self) -> Option<TsEntityName>
pub fn ts_entity_name(self) -> Option<TsEntityName>
Returns Some
if self
is of variant TsEntityName
, and None
otherwise.
sourcepub fn is_ts_external_module_ref(&self) -> bool
pub fn is_ts_external_module_ref(&self) -> bool
Returns true
if self
is of variant TsExternalModuleRef
.
sourcepub fn as_ts_external_module_ref(&self) -> Option<&TsExternalModuleRef>
pub fn as_ts_external_module_ref(&self) -> Option<&TsExternalModuleRef>
Returns Some
if self
is a reference of variant TsExternalModuleRef
, and None
otherwise.
sourcepub fn as_mut_ts_external_module_ref(
&mut self
) -> Option<&mut TsExternalModuleRef>
pub fn as_mut_ts_external_module_ref(
&mut self
) -> Option<&mut TsExternalModuleRef>
Returns Some
if self
is a mutable reference of variant TsExternalModuleRef
, and None
otherwise.
sourcepub fn expect_ts_external_module_ref(self) -> TsExternalModuleRefwhere
Self: Debug,
pub fn expect_ts_external_module_ref(self) -> TsExternalModuleRefwhere
Self: Debug,
Unwraps the value, yielding the content of TsExternalModuleRef
.
Panics
Panics if the value is not TsExternalModuleRef
, with a panic message including the content of self
.
sourcepub fn ts_external_module_ref(self) -> Option<TsExternalModuleRef>
pub fn ts_external_module_ref(self) -> Option<TsExternalModuleRef>
Returns Some
if self
is of variant TsExternalModuleRef
, and None
otherwise.
Trait Implementations
sourceimpl Clone for TsModuleRef
impl Clone for TsModuleRef
sourcefn clone(&self) -> TsModuleRef
fn clone(&self) -> TsModuleRef
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more