[][src]Trait wasmtime_runtime::TrapInfo

pub unsafe trait TrapInfo {
    pub fn as_any(&self) -> &dyn Any;
pub fn is_wasm_code(&self, pc: usize) -> bool;
pub fn custom_signal_handler(
        &self,
        call: &dyn Fn(&SignalHandler<'_>) -> bool
    ) -> bool;
pub 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

pub fn as_any(&self) -> &dyn Any[src]

Converts this object into an Any to dynamically check its type.

pub 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.

pub fn custom_signal_handler(
    &self,
    call: &dyn Fn(&SignalHandler<'_>) -> bool
) -> bool
[src]

Uses call to call a custom signal handler, if one is specified.

Returns true if call returns true, otherwise returns false.

pub fn max_wasm_stack(&self) -> usize[src]

Returns the maximum size, in bytes, the wasm native stack is allowed to grow to.

Loading content...

Implementors

Loading content...