pub enum Value {
Show 18 variants
Nil,
Number(Number),
Bool(bool),
Char(char),
String(String),
Array(Vec<Value>),
Dict(HashMap<ValueKey, Value>),
Set(HashSet<ValueKey>),
Expr(ExprId),
Symbol(u32),
Indeterminate(IndeterminateForm),
Undefined,
Error(String),
Tuple(Vec<Value>),
Result(Result<Box<Value>, String>),
Class(u32),
JitFunction(u32),
Option(Option<Box<Value>>),
}Expand description
Value type (spec §5): covers the value forms of each layer of the three-world architecture —
the symbolic layer (Expr/Symbol/Indeterminate), the numeric layer (Number), and the host layer
(Bool/String/Error, etc.). Array is a variable-length heterogeneous sequence (v2.1, spec §11.3);
Dict/Set are variable host collections keyed/elemented by immutable hashable ValueKeys (spec §4.6/§11.6).
Result/Error carry a structured Error as a message string (the structured enum from spec §16.1 is deferred to a later stage).
Variants§
Nil
Number(Number)
Bool(bool)
Char(char)
String(String)
Array(Vec<Value>)
Dict(HashMap<ValueKey, Value>)
Set(HashSet<ValueKey>)
Expr(ExprId)
Symbol(u32)
Indeterminate(IndeterminateForm)
Undefined
Error(String)
Tuple(Vec<Value>)
Result(Result<Box<Value>, String>)
Class(u32)
JitFunction(u32)
Compiled/JIT-ed function handle (spec §19.2/§19.4): a process-local id into the
prima-runtime::jit registry. Only produced by the jit(...) builtin. Like Class,
the id is process-local (no cross-process serialization) and lives for the process lifetime.