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§
Sourcefn is_cancelled(&self) -> bool
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.
impl Cancel for Atomic<bool>
A flag another task or an interrupt handler sets.
fn is_cancelled(&self) -> bool
Source§impl<T> Cancel for &T
The flag behind a reference, so a driver can hold &flag and the caller keep the flag.
impl<T> Cancel for &T
The flag behind a reference, so a driver can hold &flag and the caller keep the flag.