Function async_ffi_single

Source
pub(crate) async fn async_ffi_single<T, F>(f: F) -> Result<T, SodotError>
where T: FromFFI, for<'a> F: FnOnce(CallbackData<'a, Option<unsafe extern "C" fn(*mut c_void, ResultFFI, ConstStr)>>) -> ResultFFI,
Expand description

This should be used for any async executor function accepting a callback of type: fn(*mut c_void, ResultFFI, ConstStr) you can access the cb and extra pointers via the CallbackData accepted Note that they should not escape the 'a lifetime of the CallbackData<'a>.