interrupt_support

Trait Interruptee

source
pub trait Interruptee {
    // Required method
    fn was_interrupted(&self) -> bool;

    // Provided method
    fn err_if_interrupted(&self) -> Result<(), Interrupted> { ... }
}
Expand description

Represents the state of something that may be interrupted. Decoupled from the interrupt mechanics so that things which want to check if they have been interrupted are simpler.

Required Methods§

Provided Methods§

Implementors§