pub enum Constant {
Number(NumberBits),
Int32(i32),
String(EcmaString),
Boolean(bool),
Null,
Undefined,
BigInt(BigIntLiteral),
}Expand description
Persistable values. Heap references, holes, and uninitialized sentinels are intentionally absent because they are runtime identities/states. String constants back property keys, global names, private-name descriptions, regular-expression pattern/flags, module specifiers, and export names.
Variants§
Number(NumberBits)
Int32(i32)
String(EcmaString)
Boolean(bool)
Null
Undefined
BigInt(BigIntLiteral)
Trait Implementations§
impl Eq for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnsafeUnpin for Constant
impl UnwindSafe for Constant
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