pub enum Literal {
Number(i64),
Float(f64),
Text(Symbol),
Boolean(bool),
Nothing,
Char(char),
Duration(i64),
Date(i32),
Moment(i64),
Span {
months: i32,
days: i32,
},
Time(i64),
}Expand description
Literal values in LOGOS.
Variants§
Number(i64)
Integer literal
Float(f64)
Float literal
Text(Symbol)
Text literal
Boolean(bool)
Boolean literal
Nothing
The nothing literal (unit type)
Char(char)
Character literal
Duration(i64)
Duration literal (nanoseconds, signed for negative offsets like “5 minutes early”)
Date(i32)
Date literal (days since Unix epoch 1970-01-01)
Moment(i64)
Moment literal (nanoseconds since Unix epoch)
Span
Calendar span (months, days) - NOT flattened to seconds Months and days are kept separate because they’re incommensurable.
Time(i64)
Time-of-day literal (nanoseconds from midnight) Range: 0 to 86_399_999_999_999 (just under 24 hours)
Trait Implementations§
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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