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.

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

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

Returns true if call returns true, otherwise returns false.

Implementors