Skip to main content

CancelSignal

Trait CancelSignal 

Source
pub trait CancelSignal: Sync {
    // Required method
    fn is_cancelled(&self) -> bool;
}
Expand description

Host-provided cancellation signal.

Required Methods§

Source

fn is_cancelled(&self) -> bool

Returns true when the current operation should stop.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl CancelSignal for NeverCancelled

Source§

impl<F> CancelSignal for F
where F: Fn() -> bool + Sync,