pub enum MemberProp {
Ident(IdentName),
PrivateName(PrivateName),
Computed(ComputedPropName),
}Variants§
Implementations§
Source§impl MemberProp
impl MemberProp
Sourcepub fn as_ident(&self) -> Option<&IdentName>
pub fn as_ident(&self) -> Option<&IdentName>
Returns Some if self is a reference of variant Ident, and None otherwise.
Sourcepub fn as_mut_ident(&mut self) -> Option<&mut IdentName>
pub fn as_mut_ident(&mut self) -> Option<&mut IdentName>
Returns Some if self is a mutable reference of variant Ident, and None otherwise.
Sourcepub fn expect_ident(self) -> IdentNamewhere
MemberProp: Debug,
pub fn expect_ident(self) -> IdentNamewhere
MemberProp: Debug,
Sourcepub fn ident(self) -> Option<IdentName>
pub fn ident(self) -> Option<IdentName>
Returns Some if self is of variant Ident, and None otherwise.
Sourcepub const fn is_private_name(&self) -> bool
pub const fn is_private_name(&self) -> bool
Returns true if self is of variant PrivateName.
Sourcepub fn as_private_name(&self) -> Option<&PrivateName>
pub fn as_private_name(&self) -> Option<&PrivateName>
Returns Some if self is a reference of variant PrivateName, and None otherwise.
Sourcepub fn as_mut_private_name(&mut self) -> Option<&mut PrivateName>
pub fn as_mut_private_name(&mut self) -> Option<&mut PrivateName>
Returns Some if self is a mutable reference of variant PrivateName, and None otherwise.
Sourcepub fn expect_private_name(self) -> PrivateNamewhere
MemberProp: Debug,
pub fn expect_private_name(self) -> PrivateNamewhere
MemberProp: Debug,
Unwraps the value, yielding the content of PrivateName.
§Panics
Panics if the value is not PrivateName, with a panic message including the content of self.
Sourcepub fn private_name(self) -> Option<PrivateName>
pub fn private_name(self) -> Option<PrivateName>
Returns Some if self is of variant PrivateName, and None otherwise.
Sourcepub const fn is_computed(&self) -> bool
pub const 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
MemberProp: Debug,
pub fn expect_computed(self) -> ComputedPropNamewhere
MemberProp: Debug,
Sourcepub fn computed(self) -> Option<ComputedPropName>
pub fn computed(self) -> Option<ComputedPropName>
Returns Some if self is of variant Computed, and None otherwise.
Source§impl MemberProp
impl MemberProp
pub fn is_ident_with(&self, sym: &str) -> bool
Trait Implementations§
Source§impl Clone for MemberProp
impl Clone for MemberProp
Source§fn clone(&self) -> MemberProp
fn clone(&self) -> MemberProp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemberProp
impl Debug for MemberProp
Source§impl Default for MemberProp
impl Default for MemberProp
Source§fn default() -> MemberProp
fn default() -> MemberProp
Source§impl EqIgnoreSpan for MemberProp
impl EqIgnoreSpan for MemberProp
fn eq_ignore_span(&self, other: &MemberProp) -> bool
Source§impl<V> FoldWith<V> for MemberProp
impl<V> FoldWith<V> for MemberProp
Source§fn fold_with(self, visitor: &mut V) -> MemberProp
fn fold_with(self, visitor: &mut V) -> MemberProp
Calls Fold::fold_member_prop with self.
Source§fn fold_children_with(self, visitor: &mut V) -> MemberProp
fn fold_children_with(self, visitor: &mut V) -> MemberProp
self`` with visitor`.Source§impl From<ComputedPropName> for MemberProp
impl From<ComputedPropName> for MemberProp
Source§fn from(v: ComputedPropName) -> MemberProp
fn from(v: ComputedPropName) -> MemberProp
Source§impl From<IdentName> for MemberProp
impl From<IdentName> for MemberProp
Source§fn from(v: IdentName) -> MemberProp
fn from(v: IdentName) -> MemberProp
Source§impl From<PrivateName> for MemberProp
impl From<PrivateName> for MemberProp
Source§fn from(v: PrivateName) -> MemberProp
fn from(v: PrivateName) -> MemberProp
Source§impl From<PropName> for MemberProp
impl From<PropName> for MemberProp
Source§fn from(p: PropName) -> MemberProp
fn from(p: PropName) -> MemberProp
Source§impl Hash for MemberProp
impl Hash for MemberProp
Source§impl PartialEq for MemberProp
impl PartialEq for MemberProp
Source§impl Spanned for MemberProp
impl Spanned for MemberProp
Source§impl Take for MemberProp
impl Take for MemberProp
Source§impl<V> VisitMutWith<V> for MemberProp
impl<V> VisitMutWith<V> for MemberProp
Source§fn visit_mut_with(&mut self, visitor: &mut V)
fn visit_mut_with(&mut self, visitor: &mut V)
Calls VisitMut::visit_mut_member_prop with self.
Source§fn visit_mut_children_with(&mut self, visitor: &mut V)
fn visit_mut_children_with(&mut self, visitor: &mut V)
self`` with visitor`.Source§impl<V> VisitWith<V> for MemberProp
impl<V> VisitWith<V> for MemberProp
Source§fn visit_with(&self, visitor: &mut V)
fn visit_with(&self, visitor: &mut V)
Calls Visit::visit_member_prop with self.
Source§fn visit_children_with(&self, visitor: &mut V)
fn visit_children_with(&self, visitor: &mut V)
self`` with visitor`.impl Eq for MemberProp
impl StructuralPartialEq for MemberProp
Auto Trait Implementations§
impl Freeze for MemberProp
impl RefUnwindSafe for MemberProp
impl Send for MemberProp
impl Sync for MemberProp
impl Unpin for MemberProp
impl UnwindSafe for MemberProp
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> ImplicitClone for Twhere
T: Clone,
impl<T> ImplicitClone for Twhere
T: Clone,
fn clone_quote_var(&self) -> Self
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