Skip to main content

Module value

Module value 

Source

Structs§

VmAtomicHandle
An atomic integer handle for the VM.
VmChannelHandle
A channel handle for the VM (uses tokio mpsc).
VmClosure
A compiled closure value.
VmEnv
VM environment for variable storage.
VmGenerator
A generator object: lazily produces values via yield. The generator body runs as a spawned task that sends values through a channel.
VmTaskHandle
A spawned async task handle with cancellation support.

Enums§

ErrorCategory
Error categories for structured error handling in agent orchestration.
VmError
VmValue
VM runtime value.

Functions§

categorized_error
Create a categorized error conveniently.
closest_match
Find the closest match from a list of candidates using Levenshtein distance. Returns Some(suggestion) if a candidate is within max_dist edits.
compare_values
error_to_category
Extract error category from a VmError.
value_identity_key
Stable identity key for a value. Different allocations produce different keys; two values with the same heap identity produce the same key. For primitives the key is derived from the displayed value plus type name so logically-equal primitives always compare equal.
value_structural_hash_key
Canonical string form used as the keying material for hash_value. Different types never collide (the type name is prepended) and collection order is preserved so structurally-equal values always produce the same key. Not intended for cross-process stability; depends on the in-process iteration order for collections (Dict uses BTreeMap so keys are sorted).
values_equal
values_identical
Reference / identity equality. For heap-allocated refcounted values (List/Dict/Set/Closure) returns true only when both operands share the same underlying Rc allocation. For primitive scalars, falls back to structural equality (since primitives have no distinct identity).

Type Aliases§

ModuleFunctionRegistry
ModuleState
VmAsyncBuiltinFn
An async builtin function for the VM.
VmBuiltinFn
Sync builtin function for the VM.
VmJoinHandle
The raw join handle type for spawned tasks.