pub enum StepProgress<S: EngineSpec> {
Progress {
progress: Option<ProgressCounter>,
metadata: S::ProgressMetadata,
},
Reset {
metadata: S::ProgressMetadata,
message: Cow<'static, str>,
},
Retry {
message: Cow<'static, str>,
},
}Variants§
Progress
A step has progressed.
Fields
§
progress: Option<ProgressCounter>Current progress.
§
metadata: S::ProgressMetadataMetadata associated with progress.
Reset
Progress was reset: typically, the step failed along one path, and the step is now trying a different path.
For example, downloading from one peer failed and we’ve moved to the next peer.
Fields
§
metadata: S::ProgressMetadataMetadata associated with the reset.
Retry
The step is being retried from the beginning.
Implementations§
Source§impl<S: EngineSpec> StepProgress<S>
impl<S: EngineSpec> StepProgress<S>
Sourcepub fn with_current_and_total(
current: u64,
total: u64,
units: impl Into<ProgressUnits>,
metadata: S::ProgressMetadata,
) -> Self
pub fn with_current_and_total( current: u64, total: u64, units: impl Into<ProgressUnits>, metadata: S::ProgressMetadata, ) -> Self
Creates a new progress message with current and total values.
Sourcepub fn with_current(
current: u64,
units: impl Into<ProgressUnits>,
metadata: S::ProgressMetadata,
) -> Self
pub fn with_current( current: u64, units: impl Into<ProgressUnits>, metadata: S::ProgressMetadata, ) -> Self
Creates a new progress message with a current value.
Sourcepub fn progress(metadata: S::ProgressMetadata) -> Self
pub fn progress(metadata: S::ProgressMetadata) -> Self
Creates a new progress message without either current or total values.
Trait Implementations§
Source§impl<S: EngineSpec> Clone for StepProgress<S>
impl<S: EngineSpec> Clone for StepProgress<S>
Source§impl<S: EngineSpec> Debug for StepProgress<S>
impl<S: EngineSpec> Debug for StepProgress<S>
Source§impl<S: EngineSpec> PartialEq for StepProgress<S>
impl<S: EngineSpec> PartialEq for StepProgress<S>
impl<S: EngineSpec> Eq for StepProgress<S>
Auto Trait Implementations§
impl<S> Freeze for StepProgress<S>
impl<S> RefUnwindSafe for StepProgress<S>
impl<S> Send for StepProgress<S>
impl<S> Sync for StepProgress<S>
impl<S> Unpin for StepProgress<S>
impl<S> UnsafeUnpin for StepProgress<S>
impl<S> UnwindSafe for StepProgress<S>
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.