Struct wasmtime_runtime::VMRuntimeLimits
source · [−]#[repr(C)]pub struct VMRuntimeLimits {
pub stack_limit: UnsafeCell<usize>,
pub fuel_consumed: UnsafeCell<i64>,
pub epoch_deadline: UnsafeCell<u64>,
}
Expand description
Structure used to control interrupting wasm code.
Fields
stack_limit: UnsafeCell<usize>
Current stack limit of the wasm module.
For more information see crates/cranelift/src/lib.rs
.
fuel_consumed: UnsafeCell<i64>
Indicator of how much fuel has been consumed and is remaining to WebAssembly.
This field is typically negative and increments towards positive. Upon turning positive a wasm trap will be generated. This field is only modified if wasm is configured to consume fuel.
epoch_deadline: UnsafeCell<u64>
Deadline epoch for interruption: if epoch-based interruption is enabled and the global (per engine) epoch counter is observed to reach or exceed this value, the guest code will yield if running asynchronously.
Trait Implementations
sourceimpl Debug for VMRuntimeLimits
impl Debug for VMRuntimeLimits
sourceimpl Default for VMRuntimeLimits
impl Default for VMRuntimeLimits
sourcefn default() -> VMRuntimeLimits
fn default() -> VMRuntimeLimits
Returns the “default value” for a type. Read more
impl Send for VMRuntimeLimits
impl Sync for VMRuntimeLimits
Auto Trait Implementations
impl !RefUnwindSafe for VMRuntimeLimits
impl Unpin for VMRuntimeLimits
impl UnwindSafe for VMRuntimeLimits
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more