pub enum EvalValue {
Show 14 variants
Nil,
T,
I32(i32),
Ratio {
numer: i64,
denom: i64,
},
Commodity {
numer: i64,
denom: i64,
commodity_hi: i64,
commodity_lo: i64,
},
String(String),
Bytes(Vec<u8>),
List(Vec<EvalValue>),
Symbol(String),
Instance {
serial: u32,
layout: u32,
},
Struct(Box<StructView>),
Closure {
site: Option<u32>,
},
Condition,
Opaque,
}Expand description
Final value captured by an eval-mode module via the nomi_capture_* host
fns. Mirrors the subset of nomiscript::WasmType variants the compiler
emits as terminal stack types, plus a Bytes variant for native fns that
marshal compound data (server-command results via scripting-format,
chart SVGs, exported files, etc.). Cons/Vector/Closure/Struct still wait
for the GC migration.
Variants§
Nil
T
I32(i32)
Ratio
Commodity
Commodity-bearing amount: rational + originating commodity uuid.
Distinct from Ratio so cross-strata arithmetic is rejected by
the compiler before any wire round-trip. Wire form via
format_value: (:commodity <ratio> :id "<uuid>").
String(String)
Bytes(Vec<u8>)
List(Vec<EvalValue>)
A list; an entity is [Symbol(":label"), Symbol(":field"), value, ...].
Symbol(String)
A bare symbol, keywords carrying their leading colon.
Instance
A DEFSTRUCT instance: its identity, which the host reads separately.
Struct(Box<StructView>)
A DEFSTRUCT instance read into its name and fields, as a print shows
it; each key is the field name without its keyword colon.
Closure
A closure, printed by the site of its source; a closure whose source cannot be carried has none.
Condition
A caught condition, printed without its fields.
Opaque
A heap value the host cannot classify.
Trait Implementations§
impl StructuralPartialEq for EvalValue
Auto Trait Implementations§
impl Freeze for EvalValue
impl RefUnwindSafe for EvalValue
impl Send for EvalValue
impl Sync for EvalValue
impl Unpin for EvalValue
impl UnsafeUnpin for EvalValue
impl UnwindSafe for EvalValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more