#[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§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.