pub enum StepStatus<S: EngineSpec> {
NotStarted,
Running {
low_priority: VecDeque<StepEvent<S>>,
progress_event: ProgressEvent<S>,
},
Completed {
reason: CompletionReason,
},
Failed {
reason: FailureReason,
},
Aborted {
reason: AbortReason,
last_progress: Option<ProgressEvent<S>>,
},
WillNotBeRun {
reason: WillNotBeRunReason,
},
}Expand description
The step status as last seen by events.
Variants§
NotStarted
Running
The step is currently running.
Completed
The step has completed execution.
Fields
reason: CompletionReasonThe reason for completion.
Failed
The step has failed.
Fields
reason: FailureReasonThe reason for the failure.
Aborted
Execution was aborted while this step was running.
Fields
reason: AbortReasonThe reason for the abort.
last_progress: Option<ProgressEvent<S>>The last progress seen, if any.
WillNotBeRun
The step will not be executed because a prior step failed.
Fields
reason: WillNotBeRunReasonThe step that failed and caused this step to not be run.
Implementations§
Source§impl<S: EngineSpec> StepStatus<S>
impl<S: EngineSpec> StepStatus<S>
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns true if this step is currently running.
Sourcepub fn completion_reason(&self) -> Option<&CompletionReason>
pub fn completion_reason(&self) -> Option<&CompletionReason>
For completed steps, return the completion reason, otherwise None.
Sourcepub fn failure_reason(&self) -> Option<&FailureReason>
pub fn failure_reason(&self) -> Option<&FailureReason>
For failed steps, return the failure reason, otherwise None.
Sourcepub fn abort_reason(&self) -> Option<&AbortReason>
pub fn abort_reason(&self) -> Option<&AbortReason>
For aborted steps, return the abort reason, otherwise None.
To also obtain the last progress event at the time of the
abort, use Self::aborted_with_progress.
Sourcepub fn aborted_with_progress(
&self,
) -> Option<(&AbortReason, Option<&ProgressEvent<S>>)>
pub fn aborted_with_progress( &self, ) -> Option<(&AbortReason, Option<&ProgressEvent<S>>)>
For aborted steps, return the abort reason together with the last progress event (if any), otherwise None.
Sourcepub fn will_not_be_run_reason(&self) -> Option<&WillNotBeRunReason>
pub fn will_not_be_run_reason(&self) -> Option<&WillNotBeRunReason>
For will-not-be-run steps, return the reason, otherwise None.
Sourcepub fn low_priority(&self) -> impl Iterator<Item = &StepEvent<S>>
pub fn low_priority(&self) -> impl Iterator<Item = &StepEvent<S>>
Returns low-priority events for this step, if any.
Events are sorted by event index.
Sourcepub fn progress_event(&self) -> Option<&ProgressEvent<S>>
pub fn progress_event(&self) -> Option<&ProgressEvent<S>>
Returns the associated progress event for this step, if any.