Trait wasmer_vm::TrapHandler
source · pub unsafe trait TrapHandler {
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.
Safety
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
sourcefn custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn<'_>) -> bool) -> bool
fn custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn<'_>) -> bool) -> bool
Uses call to call a custom signal handler, if one is specified.
Returns true if call returns true, otherwise returns false.