Skip to main content

Cancellation

Trait Cancellation 

Source
pub trait Cancellation:
    Default
    + Send
    + Sync {
    // Required methods
    fn is_cancelled(&self) -> bool;
    fn cancel(&self);
}

Required Methods§

Source

fn is_cancelled(&self) -> bool

Source

fn cancel(&self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Cancellation for ()

Source§

impl Cancellation for AtomicBool

Implementors§