pub enum WorkflowStatus {
Unspecified,
Running,
Completed,
Failed,
Canceled,
Terminated,
ContinuedAsNew,
TimedOut,
Paused,
}Expand description
Execution status, mirroring temporal.api.enums.v1.WorkflowExecutionStatus.
This is a hand-written mirror rather than a re-export so that tmprl-core stays free of
the generated protos. The conversion in tmprl-client matches on the proto enum
exhaustively, so a status added by Temporal is a compile error there, not a blank cell
here.
Variants§
Implementations§
Source§impl WorkflowStatus
impl WorkflowStatus
Sourcepub const DISPLAY_ORDER: [WorkflowStatus; 9]
pub const DISPLAY_ORDER: [WorkflowStatus; 9]
Every status, in the order the header renders them: the ones an operator is looking for first. “How many are broken” is the question people open this screen to answer.
Sourcepub fn query_name(self) -> &'static str
pub fn query_name(self) -> &'static str
The name Temporal uses in a visibility query, and in the GROUP BY payloads that
CountWorkflowExecutions returns. Round-trips with WorkflowStatus::parse.
Sourcepub fn glyph(self) -> char
pub fn glyph(self) -> char
A glyph, so status is legible without colour. NO_COLOR, a 16-colour terminal and a
colour-blind reader all get the same information as everyone else.
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
Parse the name Temporal returns. Accepts the query spelling (ContinuedAsNew) and
the proto spelling (WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW), because the two
arrive from different RPCs and it is not worth making callers care which.
Sourcepub fn is_running(self) -> bool
pub fn is_running(self) -> bool
Whether the execution is still open. Closed workflows never change again, which is what lets the list cache them across a refresh.
Trait Implementations§
Source§impl Clone for WorkflowStatus
impl Clone for WorkflowStatus
Source§fn clone(&self) -> WorkflowStatus
fn clone(&self) -> WorkflowStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more