pub enum ProgressEventKind<S: EngineSpec> {
WaitingForProgress {
step: StepInfoWithMetadata<S>,
attempt: usize,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
Progress {
step: StepInfoWithMetadata<S>,
attempt: usize,
metadata: S::ProgressMetadata,
progress: Option<ProgressCounter>,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
Nested {
step: StepInfoWithMetadata<S>,
attempt: usize,
event: Box<ProgressEvent<GenericSpec>>,
step_elapsed: Duration,
attempt_elapsed: Duration,
},
Unknown,
}Variants§
WaitingForProgress
The update engine is waiting for a progress message.
The update engine sends this message immediately after a StepEvent
corresponding to a new step.
Fields
step: StepInfoWithMetadata<S>Information about the step.
Progress
Fields
step: StepInfoWithMetadata<S>Information about the step.
metadata: S::ProgressMetadataMetadata that was returned with progress.
progress: Option<ProgressCounter>Current progress.
Nested
Fields
step: StepInfoWithMetadata<S>Information about the step.
event: Box<ProgressEvent<GenericSpec>>The event that occurred.
Unknown
Future variants that might be unknown.
Implementations§
Source§impl<S: EngineSpec> ProgressEventKind<S>
impl<S: EngineSpec> ProgressEventKind<S>
Sourcepub fn progress_counter(&self) -> Option<&ProgressCounter>
pub fn progress_counter(&self) -> Option<&ProgressCounter>
Returns the progress counter for this event, if available.
Sourcepub fn leaf_attempt(&self) -> Option<usize>
pub fn leaf_attempt(&self) -> Option<usize>
Returns attempt for the leaf event, recursing into nested events as
necessary.
Returns None for unknown events.
Sourcepub fn leaf_step_elapsed(&self) -> Option<Duration>
pub fn leaf_step_elapsed(&self) -> Option<Duration>
Returns step_elapsed for the leaf event, recursing into nested events
as necessary.
Returns None for unknown events.
Sourcepub fn leaf_attempt_elapsed(&self) -> Option<Duration>
pub fn leaf_attempt_elapsed(&self) -> Option<Duration>
Returns attempt_elapsed for the leaf event, recursing into nested
events as necessary.
Returns None for unknown events.
Sourcepub fn from_generic(
value: ProgressEventKind<GenericSpec>,
) -> Result<Self, ConvertGenericError>
pub fn from_generic( value: ProgressEventKind<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) -> ProgressEventKind<GenericSpec>
pub fn into_generic(self) -> ProgressEventKind<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.
Trait Implementations§
Source§impl<S: EngineSpec> Clone for ProgressEventKind<S>
impl<S: EngineSpec> Clone for ProgressEventKind<S>
Source§impl<S: EngineSpec> Debug for ProgressEventKind<S>
impl<S: EngineSpec> Debug for ProgressEventKind<S>
Source§impl<'de, S: EngineSpec> Deserialize<'de> for ProgressEventKind<S>
impl<'de, S: EngineSpec> Deserialize<'de> for ProgressEventKind<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 ProgressEventKind<S>where
S: JsonSchemaEngineSpec + EngineSpec,
impl<S> JsonSchema for ProgressEventKind<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 ProgressEventKind<S>
impl<S: EngineSpec> PartialEq for ProgressEventKind<S>
Source§impl<S: EngineSpec> Serialize for ProgressEventKind<S>
impl<S: EngineSpec> Serialize for ProgressEventKind<S>
impl<S: EngineSpec> Eq for ProgressEventKind<S>
Auto Trait Implementations§
impl<S> Freeze for ProgressEventKind<S>where
<S as EngineSpec>::ProgressMetadata: Freeze,
<S as EngineSpec>::StepId: Freeze,
<S as EngineSpec>::Component: Freeze,
<S as EngineSpec>::StepMetadata: Freeze,
impl<S> RefUnwindSafe for ProgressEventKind<S>where
<S as EngineSpec>::ProgressMetadata: RefUnwindSafe,
<S as EngineSpec>::StepId: RefUnwindSafe,
<S as EngineSpec>::Component: RefUnwindSafe,
<S as EngineSpec>::StepMetadata: RefUnwindSafe,
impl<S> Send for ProgressEventKind<S>
impl<S> Sync for ProgressEventKind<S>
impl<S> Unpin for ProgressEventKind<S>where
<S as EngineSpec>::ProgressMetadata: Unpin,
<S as EngineSpec>::StepId: Unpin,
<S as EngineSpec>::Component: Unpin,
<S as EngineSpec>::StepMetadata: Unpin,
impl<S> UnsafeUnpin for ProgressEventKind<S>where
<S as EngineSpec>::ProgressMetadata: UnsafeUnpin,
<S as EngineSpec>::StepId: UnsafeUnpin,
<S as EngineSpec>::Component: UnsafeUnpin,
<S as EngineSpec>::StepMetadata: UnsafeUnpin,
impl<S> UnwindSafe for ProgressEventKind<S>where
<S as EngineSpec>::ProgressMetadata: UnwindSafe,
<S as EngineSpec>::StepId: UnwindSafe,
<S as EngineSpec>::Component: UnwindSafe,
<S as EngineSpec>::StepMetadata: 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.