pub enum Constant {
Number(f64),
String(String),
BigInt {
digits: String,
radix: u32,
},
Function(Box<Function>),
Template {
cooked: Vec<Option<String>>,
raw: Vec<String>,
},
}Expand description
A constant in the pool.
Variants§
Number(f64)
A number.
String(String)
A string.
BigInt
A BigInt literal: digits and radix.
Function(Box<Function>)
A nested function, referenced by fclosure.
Template
A template object: one call site’s chunks.
The raw text is carried as well as the cooked text because String.raw reads
it back verbatim, and a tagged template may legally contain an invalid escape
sequence whose cooked form is undefined.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Forget for Constant
impl Freeze for Constant
impl Move 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