Cancellable

Trait Cancellable 

Source
pub trait Cancellable: Clone + Send {
    // Required method
    fn stop(&self);
}
Expand description

Trait for types that can be stopped/cancelled.

This is implemented for Stopper and ChildStopper to allow creating CancelGuards via the StopDropRoll trait.

The method is named stop() to align with the Stop trait and avoid conflicts with inherent cancel() methods.

Required Methods§

Source

fn stop(&self)

Request stop/cancellation.

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.

Implementors§