Enum swc_ecma_ast::SuperProp
source · [−]pub enum SuperProp {
Ident(Ident),
Computed(ComputedPropName),
}
Variants
Ident(Ident)
Computed(ComputedPropName)
Implementations
sourceimpl SuperProp
impl SuperProp
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 is_computed(&self) -> bool
pub fn is_computed(&self) -> bool
Returns true
if self
is of variant Computed
.
sourcepub fn as_computed(&self) -> Option<&ComputedPropName>
pub fn as_computed(&self) -> Option<&ComputedPropName>
Returns Some
if self
is a reference of variant Computed
, and None
otherwise.
sourcepub fn as_mut_computed(&mut self) -> Option<&mut ComputedPropName>
pub fn as_mut_computed(&mut self) -> Option<&mut ComputedPropName>
Returns Some
if self
is a mutable reference of variant Computed
, and None
otherwise.
sourcepub fn expect_computed(self) -> ComputedPropNamewhere
Self: Debug,
pub fn expect_computed(self) -> ComputedPropNamewhere
Self: Debug,
sourcepub fn computed(self) -> Option<ComputedPropName>
pub fn computed(self) -> Option<ComputedPropName>
Returns Some
if self
is of variant Computed
, and None
otherwise.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for SuperProp
impl<'de> Deserialize<'de> for SuperProp
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 SuperProp
impl EqIgnoreSpan for SuperProp
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<ComputedPropName> for SuperProp
impl From<ComputedPropName> for SuperProp
sourcefn from(v: ComputedPropName) -> Self
fn from(v: ComputedPropName) -> Self
Converts to this type from the input type.
impl Eq for SuperProp
impl StructuralEq for SuperProp
impl StructuralPartialEq for SuperProp
Auto Trait Implementations
impl RefUnwindSafe for SuperProp
impl Send for SuperProp
impl Sync for SuperProp
impl Unpin for SuperProp
impl UnwindSafe for SuperProp
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