Skip to main content

CancellableFutureWithReason

Trait CancellableFutureWithReason 

Source
pub trait CancellableFutureWithReason<T>: CancellableFuture<T> {
    // Required method
    fn cancel_with_reason(&self, reason: String);
}
Expand description

A Future that can be cancelled with a reason

Required Methods§

Source

fn cancel_with_reason(&self, reason: String)

Cancel this Future with a reason

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§