pub struct Vm<'vm> { /* private fields */ }Expand description
Stack-based virtual machine for executing bytecode programs.
The VM evaluates programs by executing bytecode instructions on a stack, performing arithmetic operations and function calls.
§Error Handling
Behavior varies based on the numeric backend:
-
f64 mode: Relaxed error handling. Only catches errors that would cause panics. Allows
InfandNaNresults from operations like1/0orsqrt(-1). -
Decimal mode: Strict error handling. All arithmetic operations are checked for overflow/underflow. Returns errors for domain violations.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'vm> Freeze for Vm<'vm>
impl<'vm> RefUnwindSafe for Vm<'vm>
impl<'vm> Send for Vm<'vm>
impl<'vm> Sync for Vm<'vm>
impl<'vm> Unpin for Vm<'vm>
impl<'vm> !UnwindSafe for Vm<'vm>
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