pub enum Value {
Symbol(SymbolId),
Integer(i64),
Float(f64),
Boolean(bool),
String(String),
Timestamp(ClockTime),
}Expand description
A typed value that can appear in a memory slot such as
crate::Semantic::o or crate::Procedural::trigger.
Mirrors the canonical-form value tags:
Symbol (0x01), Integer (0x02), Float (0x03), Boolean (0x04),
String (0x05), Timestamp (0x06) — see ir-canonical-form.md § 3.2.
§Examples
use mimir_core::{SymbolId, Value};
let v = Value::Symbol(SymbolId::new(42));
assert!(matches!(v, Value::Symbol(_)));Variants§
Symbol(SymbolId)
A symbol reference (wire tag 0x01).
Integer(i64)
A signed 64-bit integer (wire tag 0x02, ZigZag varint-encoded).
Float(f64)
An IEEE 754 binary64 float (wire tag 0x03).
Boolean(bool)
A boolean (wire tag 0x04).
String(String)
A UTF-8 string literal (wire tag 0x05).
Timestamp(ClockTime)
A timestamp (wire tag 0x06).
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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