[][src]Macro ffi_utils::try_cb

macro_rules! try_cb {
    ($result:expr, $user_data:expr, $cb:expr) => { ... };
}

Given a result, calls the callback if it is an error, otherwise produces the wrapped value. Should be called within catch_unwind, so returns None on error.

The error must implement Debug + Display.