Skip to main content

TaskStateExt

Trait TaskStateExt 

Source
pub trait TaskStateExt {
    // Required methods
    fn is_terminal(&self) -> bool;
    fn is_interrupted(&self) -> bool;
    fn is_settled(&self) -> bool;
    fn is_cancelable(&self) -> bool;
}

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TaskStateExt for EnumValue<TaskState>

An unrecognized state is treated as non-terminal, and therefore cancelable: a peer speaking a newer protocol may have states this build does not know, and refusing to cancel one would leave the client no way out at all.

Source§

fn is_settled(&self) -> bool

An unrecognized state is not settled: a caller waiting on it should keep waiting rather than report a task finished on the strength of a state this build cannot read.

Source§

fn is_terminal(&self) -> bool

Source§

fn is_interrupted(&self) -> bool

Source§

fn is_cancelable(&self) -> bool

Implementors§