pub type ForeignExecutorCallback = extern "C" fn(_: ForeignExecutorHandle, _: u32, _: Option<extern "C" fn(_: *const (), _: RustTaskCallbackCode)>, _: *const ()) -> i8;
Expand description

Reexport items from other uniffi creates Callback to schedule a Rust call with a ForeignExecutor. The bindings code registers exactly one of these with the Rust code.

Delay is an approximate amount of ms to wait before scheduling the call. Delay is usually 0, which means schedule sometime soon.

As a special case, when Rust drops the foreign executor, with task=null. The foreign bindings should release the reference to the executor that was reserved for Rust.

This callback can be invoked from any thread, including threads created by Rust.

The callback should return one of the ForeignExecutorCallbackResult values.