pub enum Value {
Show 14 variants
Null,
Bool(bool),
Number(f64),
Dimension {
value: f64,
unit: Unit,
},
String(String),
Array(Vec<Value>),
Map(HashMap<String, Value>),
ComponentObject {
id: ComponentId,
component_type: String,
},
Object(ObjectId),
Identifier(String),
BuiltinTable(BuiltinTableKind),
ComponentExpr(Box<MaterializedCE>),
Function {
params: Vec<String>,
body: BlockStatement,
captured_env: Arc<HashMap<String, Value>>,
heap: HeapHandle,
},
Module {
named: HashMap<String, Value>,
sequence: Vec<MaterializedCE>,
heap: HeapHandle,
},
}Expand description
Runtime value representation for Meow Meow evaluation.
Variants§
Null
Bool(bool)
Number(f64)
Dimension
Numeric value tagged with a source-level unit suffix (e.g. 50%,
20gu, 30deg). Produced by Expression::Dimension. Consumers
such as the Style setters use this to disambiguate Percent vs
GlyphUnits at the boundary between MMS values and engine types.
String(String)
Array(Vec<Value>)
Map(HashMap<String, Value>)
ComponentObject
A live engine component (already spawned). Holds the engine-side
ComponentId and the MMS component type name (e.g. "Anim", "T").
Produced when let x = CE is evaluated with a live reply channel
(eval_with_world). The component_type drives method dispatch.
Object(ObjectId)
Heap-allocated MMS object (map / record / instance).
Identifier(String)
Symbolic identifier value (e.g. enum-like flags passed to constructors).
BuiltinTable(BuiltinTableKind)
Host-provided built-in namespace/table.
ComponentExpr(Box<MaterializedCE>)
A fully-evaluated component expression ready to spawn.
Produced whenever a ComponentExpression AST node is evaluated.
Function
A closure: params + body AST + captured environment snapshot.
Module
A loaded module: named exports + ordered sequence of root CE emits.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.