Skip to main content

Status

Trait Status 

Source
pub trait Status {
    // Required methods
    fn is_terminal(&self) -> bool;
    fn is_active(&self) -> bool;
    fn is_paused(&self) -> bool;
}
Expand description

Common trait for lifecycle status enums across the protocol layer.

Every status enum — thread, goal, fleet run, worker, and job status — implements this trait so generic code can ask three universal questions without matching on every variant.

Required Methods§

Source

fn is_terminal(&self) -> bool

Returns true when this status represents a final, non-progressable state (e.g. Completed, Failed, Cancelled, Archived, Retired).

Source

fn is_active(&self) -> bool

Returns true when work is currently in-flight (e.g. Running, Active, Busy, Queued, Pending).

Source

fn is_paused(&self) -> bool

Returns true when the item has been explicitly paused by the user or system (e.g. Paused).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§