pub enum Lit {
Int(i64),
Float(f64),
Str(Arc<str>),
Bool(bool),
Keyword(Arc<str>),
}Expand description
A literal. Floats compare by bit pattern so that Lit — and therefore Node — can be Eq:
two source files that differ only in 0.0 versus -0.0 are different programs.
Variants§
Int(i64)
Float(f64)
Str(Arc<str>)
Bool(bool)
Keyword(Arc<str>)
:keyword — a self-evaluating name, used for record field labels and enum-ish tags. The
sketch writes {:id id :text text}, so keywords are in the core notation from the start.
Implementations§
Trait Implementations§
impl Eq 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 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