Skip to main content

caught_sync

Function caught_sync 

Source
pub fn caught_sync<T>(
    operation: &'static str,
    work: impl FnOnce() -> T,
) -> Result<T, Bug>
Expand description

caught for a synchronous call: an FFI callback, a dedicated thread’s body, a Drop. Unwinding out of an extern "C" function aborts the process, so such a function catches here and answers with its own failure value.