pub enum StepEventKind<S: EngineSpec> {
NoStepsDefined,
ExecutionStarted {
steps: Vec<StepInfo<S>>,
components: Vec<StepComponentSummary<S>>,
first_step: StepInfoWithMetadata<S>,
},
ProgressReset {
step: StepInfoWithMetadata<S>,
attempt: usize,
metadata: S::ProgressMetadata,
step_elapsed: Duration,
attempt_elapsed: Duration,
message: Cow<'static, str>,
},
AttemptRetry {
step: StepInfoWithMetadata<S>,
next_attempt: usize,
step_elapsed: Duration,
attempt_elapsed: Duration,
message: Cow<'static, str>,
},
StepCompleted {
step: StepInfoWithMetadata<S>,
attempt: usize,
outcome: StepOutcome<S>,
next_step: StepInfoWithMetadata<S>,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
ExecutionCompleted {
last_step: StepInfoWithMetadata<S>,
last_attempt: usize,
last_outcome: StepOutcome<S>,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
ExecutionFailed {
failed_step: StepInfoWithMetadata<S>,
total_attempts: usize,
step_elapsed: Duration,
attempt_elapsed: Duration,
message: String,
causes: Vec<String>,
},
ExecutionAborted {
aborted_step: StepInfoWithMetadata<S>,
attempt: usize,
step_elapsed: Duration,
attempt_elapsed: Duration,
message: String,
},
Nested {
step: StepInfoWithMetadata<S>,
attempt: usize,
event: Box<StepEvent<GenericSpec>>,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
Unknown,
}Variants§
NoStepsDefined
No steps were defined, and the executor exited without doing anything.
This is a terminal event: it is guaranteed that no more events will be seen after this one.
ExecutionStarted
Execution was started.
This is an initial event – it is always expected to be the first event received from the event stream.
Fields
components: Vec<StepComponentSummary<S>>A list of components, along with the number of items each component has.
first_step: StepInfoWithMetadata<S>Information about the first step.
ProgressReset
Progress was reset along an attempt, and this attempt is going down a different path.
Fields
step: StepInfoWithMetadata<S>Information about the step.
metadata: S::ProgressMetadataProgress-related metadata associated with this attempt.
AttemptRetry
An attempt failed and this step is being retried.
Fields
step: StepInfoWithMetadata<S>Information about the step.
StepCompleted
A step is complete and the next step has been started.
Fields
step: StepInfoWithMetadata<S>Information about the step that just completed.
outcome: StepOutcome<S>The outcome of the step.
next_step: StepInfoWithMetadata<S>The next step that is being started.
ExecutionCompleted
Execution is complete.
This is a terminal event: it is guaranteed that no more events will be seen after this one.
Fields
last_step: StepInfoWithMetadata<S>Information about the last step that completed.
last_outcome: StepOutcome<S>The outcome of the last step.
ExecutionFailed
Execution failed.
This is a terminal event: it is guaranteed that no more events will be seen after this one.
Fields
failed_step: StepInfoWithMetadata<S>Information about the step that failed.
ExecutionAborted
Execution aborted by an external user.
This is a terminal event: it is guaranteed that no more events will be seen after this one.
Fields
aborted_step: StepInfoWithMetadata<S>Information about the step that was running at the time execution was aborted.
Nested
A nested step event occurred.
Fields
step: StepInfoWithMetadata<S>Information about the step that’s occurring.
event: Box<StepEvent<GenericSpec>>The event that occurred.
Unknown
Future variants that might be unknown.
Implementations§
Source§impl<S: EngineSpec> StepEventKind<S>
impl<S: EngineSpec> StepEventKind<S>
Sourcepub fn is_terminal(&self) -> StepEventIsTerminal
pub fn is_terminal(&self) -> StepEventIsTerminal
Returns whether this is a terminal step event.
Terminal events guarantee that there are no further events coming from this update engine.
This does not recurse into nested events; those are always non-terminal.
Sourcepub fn priority(&self) -> StepEventPriority
pub fn priority(&self) -> StepEventPriority
Returns the priority of the event.
For more about this, see StepEventPriority.
Sourcepub fn from_generic(
value: StepEventKind<GenericSpec>,
) -> Result<Self, ConvertGenericError>
pub fn from_generic( value: StepEventKind<GenericSpec>, ) -> Result<Self, ConvertGenericError>
Converts a generic version into self.
This version can be used to convert a generic type into a more concrete form.
Sourcepub fn into_generic(self) -> StepEventKind<GenericSpec>
pub fn into_generic(self) -> StepEventKind<GenericSpec>
Converts self into its generic version.
This version can be used to share data across different kinds of engines.
If any of the data in self fails to serialize to a
serde_json::Value, it will be replaced with
serde_json::Value::Null. Since serde_json::Value represents
an arbitrary JSON value, such data would have failed to serialize
anyway.
Sourcepub fn step_outcome(&self) -> Option<&StepOutcome<S>>
pub fn step_outcome(&self) -> Option<&StepOutcome<S>>
If this represents a successfully-completed step, returns the outcome.
This does not recurse into nested events.
Trait Implementations§
Source§impl<S: EngineSpec> Clone for StepEventKind<S>
impl<S: EngineSpec> Clone for StepEventKind<S>
Source§impl<S: EngineSpec> Debug for StepEventKind<S>
impl<S: EngineSpec> Debug for StepEventKind<S>
Source§impl<'de, S: EngineSpec> Deserialize<'de> for StepEventKind<S>
impl<'de, S: EngineSpec> Deserialize<'de> for StepEventKind<S>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<S> JsonSchema for StepEventKind<S>where
S: JsonSchemaEngineSpec + EngineSpec,
impl<S> JsonSchema for StepEventKind<S>where
S: JsonSchemaEngineSpec + EngineSpec,
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl<S: EngineSpec> PartialEq for StepEventKind<S>
impl<S: EngineSpec> PartialEq for StepEventKind<S>
Source§impl<S: EngineSpec> Serialize for StepEventKind<S>
impl<S: EngineSpec> Serialize for StepEventKind<S>
impl<S: EngineSpec> Eq for StepEventKind<S>
Auto Trait Implementations§
impl<S> Freeze for StepEventKind<S>where
<S as EngineSpec>::ProgressMetadata: Freeze,
<S as EngineSpec>::StepId: Freeze,
<S as EngineSpec>::Component: Freeze,
<S as EngineSpec>::StepMetadata: Freeze,
<S as EngineSpec>::CompletionMetadata: Freeze,
<S as EngineSpec>::SkippedMetadata: Freeze,
impl<S> RefUnwindSafe for StepEventKind<S>where
<S as EngineSpec>::ProgressMetadata: RefUnwindSafe,
<S as EngineSpec>::StepId: RefUnwindSafe,
<S as EngineSpec>::Component: RefUnwindSafe,
<S as EngineSpec>::StepMetadata: RefUnwindSafe,
<S as EngineSpec>::CompletionMetadata: RefUnwindSafe,
<S as EngineSpec>::SkippedMetadata: RefUnwindSafe,
impl<S> Send for StepEventKind<S>
impl<S> Sync for StepEventKind<S>
impl<S> Unpin for StepEventKind<S>where
<S as EngineSpec>::ProgressMetadata: Unpin,
<S as EngineSpec>::StepId: Unpin,
<S as EngineSpec>::Component: Unpin,
<S as EngineSpec>::StepMetadata: Unpin,
<S as EngineSpec>::CompletionMetadata: Unpin,
<S as EngineSpec>::SkippedMetadata: Unpin,
impl<S> UnsafeUnpin for StepEventKind<S>where
<S as EngineSpec>::ProgressMetadata: UnsafeUnpin,
<S as EngineSpec>::StepId: UnsafeUnpin,
<S as EngineSpec>::Component: UnsafeUnpin,
<S as EngineSpec>::StepMetadata: UnsafeUnpin,
<S as EngineSpec>::CompletionMetadata: UnsafeUnpin,
<S as EngineSpec>::SkippedMetadata: UnsafeUnpin,
impl<S> UnwindSafe for StepEventKind<S>where
<S as EngineSpec>::ProgressMetadata: UnwindSafe,
<S as EngineSpec>::StepId: UnwindSafe,
<S as EngineSpec>::Component: UnwindSafe,
<S as EngineSpec>::StepMetadata: UnwindSafe,
<S as EngineSpec>::CompletionMetadata: UnwindSafe,
<S as EngineSpec>::SkippedMetadata: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.