Function uniffi::ffi::rust_future_cancel
pub unsafe fn rust_future_cancel<ReturnType, UT>(handle: Handle)where
dyn RustFutureFfi<ReturnType>: HandleAlloc<UT>,
Expand description
Cancel a Rust future
Any current and future continuations will be immediately called with RustFuturePoll::Ready.
This is needed for languages like Swift, which continuation to wait for the continuation to be called when tasks are cancelled.
Safety
The Handle must not previously have been passed to rust_future_free