pub enum PropertyKey {
Identifier(Identifier),
String(String),
Number(f64),
Computed(Box<Expression>),
Private(PrivateIdentifier),
}Expand description
A property key as used in object literals, class members, and destructuring patterns.
Variants§
Identifier(Identifier)
A plain identifier key.
String(String)
A string-literal key.
Number(f64)
A numeric-literal key.
Computed(Box<Expression>)
A computed key written in brackets.
Private(PrivateIdentifier)
A private class-field key (#name).
Trait Implementations§
Source§impl Clone for PropertyKey
impl Clone for PropertyKey
Source§fn clone(&self) -> PropertyKey
fn clone(&self) -> PropertyKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropertyKey
impl Debug for PropertyKey
Source§impl Display for PropertyKey
impl Display for PropertyKey
impl Eq for PropertyKey
Source§impl PartialEq for PropertyKey
impl PartialEq for PropertyKey
impl StructuralPartialEq for PropertyKey
Auto Trait Implementations§
impl Freeze for PropertyKey
impl RefUnwindSafe for PropertyKey
impl Send for PropertyKey
impl Sync for PropertyKey
impl Unpin for PropertyKey
impl UnsafeUnpin for PropertyKey
impl UnwindSafe for PropertyKey
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