Enum swc_ecma_ast::TsThisTypeOrIdent
source · [−]pub enum TsThisTypeOrIdent {
TsThisType(TsThisType),
Ident(Ident),
}
Variants
TsThisType(TsThisType)
Ident(Ident)
Implementations
sourceimpl TsThisTypeOrIdent
impl TsThisTypeOrIdent
sourcepub fn is_ts_this_type(&self) -> bool
pub fn is_ts_this_type(&self) -> bool
Returns true
if self
is of variant TsThisType
.
sourcepub fn as_ts_this_type(&self) -> Option<&TsThisType>
pub fn as_ts_this_type(&self) -> Option<&TsThisType>
Returns Some
if self
is a reference of variant TsThisType
, and None
otherwise.
sourcepub fn as_mut_ts_this_type(&mut self) -> Option<&mut TsThisType>
pub fn as_mut_ts_this_type(&mut self) -> Option<&mut TsThisType>
Returns Some
if self
is a mutable reference of variant TsThisType
, and None
otherwise.
sourcepub fn expect_ts_this_type(self) -> TsThisTypewhere
Self: Debug,
pub fn expect_ts_this_type(self) -> TsThisTypewhere
Self: Debug,
Unwraps the value, yielding the content of TsThisType
.
Panics
Panics if the value is not TsThisType
, with a panic message including the content of self
.
sourcepub fn ts_this_type(self) -> Option<TsThisType>
pub fn ts_this_type(self) -> Option<TsThisType>
Returns Some
if self
is of variant TsThisType
, and None
otherwise.
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut Ident>
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
sourcepub fn expect_ident(self) -> Identwhere
Self: Debug,
pub fn expect_ident(self) -> Identwhere
Self: Debug,
Trait Implementations
sourceimpl Clone for TsThisTypeOrIdent
impl Clone for TsThisTypeOrIdent
sourcefn clone(&self) -> TsThisTypeOrIdent
fn clone(&self) -> TsThisTypeOrIdent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TsThisTypeOrIdent
impl Debug for TsThisTypeOrIdent
sourceimpl<'de> Deserialize<'de> for TsThisTypeOrIdent
impl<'de> Deserialize<'de> for TsThisTypeOrIdent
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EqIgnoreSpan for TsThisTypeOrIdent
impl EqIgnoreSpan for TsThisTypeOrIdent
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<Ident> for TsThisTypeOrIdent
impl From<Ident> for TsThisTypeOrIdent
sourceimpl From<TsThisType> for TsThisTypeOrIdent
impl From<TsThisType> for TsThisTypeOrIdent
sourcefn from(v: TsThisType) -> Self
fn from(v: TsThisType) -> Self
Converts to this type from the input type.
sourceimpl Hash for TsThisTypeOrIdent
impl Hash for TsThisTypeOrIdent
sourceimpl PartialEq<TsThisTypeOrIdent> for TsThisTypeOrIdent
impl PartialEq<TsThisTypeOrIdent> for TsThisTypeOrIdent
sourcefn eq(&self, other: &TsThisTypeOrIdent) -> bool
fn eq(&self, other: &TsThisTypeOrIdent) -> bool
sourceimpl Serialize for TsThisTypeOrIdent
impl Serialize for TsThisTypeOrIdent
sourceimpl Spanned for TsThisTypeOrIdent
impl Spanned for TsThisTypeOrIdent
impl Eq for TsThisTypeOrIdent
impl StructuralEq for TsThisTypeOrIdent
impl StructuralPartialEq for TsThisTypeOrIdent
Auto Trait Implementations
impl RefUnwindSafe for TsThisTypeOrIdent
impl Send for TsThisTypeOrIdent
impl Sync for TsThisTypeOrIdent
impl Unpin for TsThisTypeOrIdent
impl UnwindSafe for TsThisTypeOrIdent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more