Skip to main content

CancellableFuture

Trait CancellableFuture 

Source
pub trait CancellableFuture<T>: Future<Output = T> + FusedFuture {
    // Required method
    fn cancel(&self);
}
Expand description

A Future that can be cancelled. Used in the prototype SDK for cancelling operations like timers and activities.

Required Methods§

Source

fn cancel(&self)

Cancel this Future

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§