pub enum Lit {
Bool(bool),
Int(i64),
Long(i64),
Float(f64),
Double(f64),
Char(char),
Str(String),
TextBlock(String),
NumRaw {
text: String,
val: NumVal,
},
Null,
}Expand description
字面量。
Variants§
Bool(bool)
Int(i64)
Long(i64)
Float(f64)
Double(f64)
Char(char)
Str(String)
TextBlock(String)
文本块("""..."""),存去引号后的原文。
NumRaw
带原文的数值字面量:保留 0x1F / 1.5e2f / 1_000_000L 等原文形式。
Null
Trait Implementations§
impl StructuralPartialEq for Lit
Auto Trait Implementations§
impl Freeze for Lit
impl RefUnwindSafe for Lit
impl Send for Lit
impl Sync for Lit
impl Unpin for Lit
impl UnsafeUnpin for Lit
impl UnwindSafe for Lit
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