Enum swc_ecma_ast::TsEnumMemberId
source · [−]Expand description
- Invalid: Ident with empty symbol.
Variants
Ident(Ident)
Str(Str)
Implementations
sourceimpl TsEnumMemberId
impl TsEnumMemberId
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,
sourcepub fn ident(self) -> Option<Ident>
pub fn ident(self) -> Option<Ident>
Returns Some
if self
is of variant Ident
, and None
otherwise.
sourcepub fn as_str(&self) -> Option<&Str>
pub fn as_str(&self) -> Option<&Str>
Returns Some
if self
is a reference of variant Str
, and None
otherwise.
sourcepub fn as_mut_str(&mut self) -> Option<&mut Str>
pub fn as_mut_str(&mut self) -> Option<&mut Str>
Returns Some
if self
is a mutable reference of variant Str
, and None
otherwise.
sourcepub fn expect_str(self) -> Strwhere
Self: Debug,
pub fn expect_str(self) -> Strwhere
Self: Debug,
Trait Implementations
sourceimpl AsRef<Atom<JsWordStaticSet>> for TsEnumMemberId
impl AsRef<Atom<JsWordStaticSet>> for TsEnumMemberId
sourceimpl Clone for TsEnumMemberId
impl Clone for TsEnumMemberId
sourcefn clone(&self) -> TsEnumMemberId
fn clone(&self) -> TsEnumMemberId
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 TsEnumMemberId
impl Debug for TsEnumMemberId
sourceimpl<'de> Deserialize<'de> for TsEnumMemberId
impl<'de> Deserialize<'de> for TsEnumMemberId
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 TsEnumMemberId
impl EqIgnoreSpan for TsEnumMemberId
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<Ident> for TsEnumMemberId
impl From<Ident> for TsEnumMemberId
sourceimpl From<Str> for TsEnumMemberId
impl From<Str> for TsEnumMemberId
sourceimpl Hash for TsEnumMemberId
impl Hash for TsEnumMemberId
sourceimpl PartialEq<TsEnumMemberId> for TsEnumMemberId
impl PartialEq<TsEnumMemberId> for TsEnumMemberId
sourcefn eq(&self, other: &TsEnumMemberId) -> bool
fn eq(&self, other: &TsEnumMemberId) -> bool
sourceimpl Serialize for TsEnumMemberId
impl Serialize for TsEnumMemberId
sourceimpl Spanned for TsEnumMemberId
impl Spanned for TsEnumMemberId
impl Eq for TsEnumMemberId
impl StructuralEq for TsEnumMemberId
impl StructuralPartialEq for TsEnumMemberId
Auto Trait Implementations
impl RefUnwindSafe for TsEnumMemberId
impl Send for TsEnumMemberId
impl Sync for TsEnumMemberId
impl Unpin for TsEnumMemberId
impl UnwindSafe for TsEnumMemberId
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