pub enum PropName {
Literal(PropKey),
Computed(Box<Expr>),
Private(Ident),
}Expand description
A property key.
Variants§
Literal(PropKey)
A bare identifier, string or numeric key. The variant records which
spelling was used, because { 1e2: x } needs the numeric value while
{ "1e2": x } needs the string.
Computed(Box<Expr>)
[expr]
Private(Ident)
#name (classes only).
Implementations§
Source§impl PropName
impl PropName
Sourcepub fn static_name(&self) -> Option<PropKeyRef<'_>>
pub fn static_name(&self) -> Option<PropKeyRef<'_>>
Static name of the key, when it is not computed.
Trait Implementations§
impl StructuralPartialEq for PropName
Auto Trait Implementations§
impl Forget for PropName
impl Freeze for PropName
impl Move for PropName
impl RefUnwindSafe for PropName
impl Send for PropName
impl Sync for PropName
impl Unpin for PropName
impl UnsafeUnpin for PropNamewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Expr is !null: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
impl UnwindSafe for PropName
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
Mutably borrows from an owned value. Read more