unregister_hook

Function unregister_hook 

Source
pub unsafe fn unregister_hook(id: ExceptionHookId) -> Option<DynExceptionHook>
Expand description

Unregisters an exception hook.

Returns the exception hook, if found. Calling unregister_exception_hook multiple times with the same hook id will result in subsequent calls returning None.

ยงSafety

In isolation, this call is always safe. The function is declared as unsafe in order to simplify reasoning about the soundness of unsafe code which potentially triggers exceptions. Making unregistration of exception hooks an unsafe operation means that unsafe code can rely on knowing exactly what will happen when a exception occurs, without having to account for the possibility that untrusted safe code may have uninstalled an exception hook it was relying on.