pub enum TsModuleRef {
TsEntityName(TsEntityName),
TsExternalModuleRef(TsExternalModuleRef),
}
Variants§
TsEntityName(TsEntityName)
TsExternalModuleRef(TsExternalModuleRef)
Implementations§
source§impl TsModuleRef
impl TsModuleRef
sourcepub const fn is_ts_entity_name(&self) -> bool
pub const 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 const fn is_ts_external_module_ref(&self) -> bool
pub const 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§
source§impl Clone for TsModuleRef
impl Clone for TsModuleRef
source§fn clone(&self) -> TsModuleRef
fn clone(&self) -> TsModuleRef
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TsModuleRef
impl Debug for TsModuleRef
source§impl<'de> Deserialize<'de> for TsModuleRef
impl<'de> Deserialize<'de> for TsModuleRef
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EqIgnoreSpan for TsModuleRef
impl EqIgnoreSpan for TsModuleRef
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<TsEntityName> for TsModuleRef
impl From<TsEntityName> for TsModuleRef
source§fn from(v: TsEntityName) -> Self
fn from(v: TsEntityName) -> Self
source§impl From<TsExternalModuleRef> for TsModuleRef
impl From<TsExternalModuleRef> for TsModuleRef
source§fn from(v: TsExternalModuleRef) -> Self
fn from(v: TsExternalModuleRef) -> Self
source§impl Hash for TsModuleRef
impl Hash for TsModuleRef
source§impl PartialEq for TsModuleRef
impl PartialEq for TsModuleRef
source§impl Serialize for TsModuleRef
impl Serialize for TsModuleRef
source§impl Spanned for TsModuleRef
impl Spanned for TsModuleRef
impl Eq for TsModuleRef
impl StructuralPartialEq for TsModuleRef
Auto Trait Implementations§
impl Freeze for TsModuleRef
impl RefUnwindSafe for TsModuleRef
impl Send for TsModuleRef
impl Sync for TsModuleRef
impl Unpin for TsModuleRef
impl UnwindSafe for TsModuleRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more