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<'arbitrary> Arbitrary<'arbitrary> for TsModuleRef
impl<'arbitrary> Arbitrary<'arbitrary> for TsModuleRef
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl Clone for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§fn clone(&self) -> TsModuleRef
fn clone(&self) -> TsModuleRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl Debug for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§impl<'de> Decode<'de> for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl<'de> Decode<'de> for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§impl<'de> Deserialize<'de> for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl<'de> Deserialize<'de> for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.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 Encode for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl Encode for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.impl Eq for TsModuleRef
Source§impl EqIgnoreSpan for TsModuleRef
impl EqIgnoreSpan for TsModuleRef
fn eq_ignore_span(&self, other: &Self) -> bool
Source§impl From<TsEntityName> for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl From<TsEntityName> for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§fn from(v: TsEntityName) -> Self
fn from(v: TsEntityName) -> Self
Source§impl From<TsExternalModuleRef> for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl From<TsExternalModuleRef> for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.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
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl PartialEq for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§impl Serialize for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl Serialize for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Source§impl ShrinkToFit for TsModuleRef
impl ShrinkToFit for TsModuleRef
fn shrink_to_fit(&mut self)
Source§impl Spanned for TsModuleRef
Available on swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.
impl Spanned for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.impl StructuralPartialEq for TsModuleRef
swc_ast_unknown and crate feature encoding-impl and crate feature serde-impl only.Auto Trait Implementations§
impl Freeze for TsModuleRef
impl RefUnwindSafe for TsModuleRef
impl Send for TsModuleRef
impl Sync for TsModuleRef
impl Unpin for TsModuleRef
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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