Skip to main content

CancellableIntoFutureExt

Trait CancellableIntoFutureExt 

Source
pub trait CancellableIntoFutureExt: IntoFuture + Sized {
    // Provided method
    fn cancellable<'a>(self) -> Cancellable<'a, Self::Output> ⓘ
       where Self::IntoFuture: SendOutsideWasm + 'a { ... }
}
Expand description

Extension trait for wrapping an IntoFuture with cooperative cancellation.

Provided Methods§

Source

fn cancellable<'a>(self) -> Cancellable<'a, Self::Output> ⓘ
where Self::IntoFuture: SendOutsideWasm + 'a,

Wrap this future in a Cancellable, which resolves to Some with the output of this future if it completes first, or to None if it is cancelled first.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§