pub enum Value {
Show 17 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),
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)
Option(Option<Box<Value>>)
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