Function ffi_utils::test_utils::call_2
[−]
[src]
pub unsafe fn call_2<F, E0, E1, T0, T1>(f: F) -> Result<(T0, T1), i32> where
F: FnOnce(*mut c_void, extern "C" fn(_: *mut c_void, _: FfiResult, _: T0::C, _: T1::C)),
E0: Debug,
E1: Debug,
T0: ReprC<Error = E0>,
T1: ReprC<Error = E1>,
Call a FFI function and block until its callback gets called, then return
the argument which were passed to that callback.
Use this if the callback accepts two arguments in addition to user_data
and error_code
.