Trait wasmer_vm::TrapHandler[][src]

pub unsafe trait TrapHandler {
    fn as_any(&self) -> &dyn Any;
fn custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn) -> bool) -> bool; }
Expand description

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

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

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

Returns true if call returns true, otherwise returns false.

Implementors