Trait wasmtime_runtime::TrapInfo [−][src]
pub unsafe trait TrapInfo {
fn as_any(&self) -> &dyn Any;
fn is_wasm_code(&self, pc: usize) -> bool;
fn custom_signal_handler(
&self,
call: &dyn Fn(&SignalHandler<'_>) -> bool
) -> bool;
fn max_wasm_stack(&self) -> usize;
}A package of functionality needed by catch_traps to figure out what to do
when handling a trap.
Note that this is an unsafe trait at least because it’s being run in the
context of a synchronous signal handler, so it needs to be careful to not
access too much state in answering these queries.
Required methods
fn as_any(&self) -> &dyn Any[src]
Converts this object into an Any to dynamically check its type.
fn is_wasm_code(&self, pc: usize) -> bool[src]
Returns whether the given program counter lies within wasm code, indicating whether we should handle a trap or not.
fn custom_signal_handler(
&self,
call: &dyn Fn(&SignalHandler<'_>) -> bool
) -> bool[src]
&self,
call: &dyn Fn(&SignalHandler<'_>) -> bool
) -> bool
Uses call to call a custom signal handler, if one is specified.
Returns true if call returns true, otherwise returns false.
fn max_wasm_stack(&self) -> usize[src]
Returns the maximum size, in bytes, the wasm native stack is allowed to grow to.