pub enum EvalValue {
Nil,
Bool(bool),
I32(i32),
Ratio {
numer: i64,
denom: i64,
},
Commodity {
numer: i64,
denom: i64,
commodity_hi: i64,
commodity_lo: i64,
},
String(String),
Bytes(Vec<u8>),
}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
Bool(bool)
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>)
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
Mutably borrows from an owned value. Read more
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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