Skip to main content

Cancel

Trait Cancel 

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

A flag the caller sets to ask a procedure to stop.

A procedure reads it between its calls, never in the middle of one, and never clears it: the caller resets it before the next procedure, or that one stops at its first check.

Required Methods§

Source

fn is_cancelled(&self) -> bool

Whether the caller has asked the procedure to stop.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Cancel for Atomic<bool>

A flag another task or an interrupt handler sets.

Source§

impl<T> Cancel for &T
where T: Cancel + ?Sized,

The flag behind a reference, so a driver can hold &flag and the caller keep the flag.

Implementors§