#[non_exhaustive]pub enum StepAttemptProgress {
Unspecified,
NotStarted,
NotCompleted,
}Expand description
Reports how far attempts of a failed Step method progressed.
Since 1.35.0.
Read RecoveryErrorInfo::attempt_progress during recovery before deciding whether to repeat
side effects. Progress describes all attempts of that method call, rather than just the last one.
A handler may have performed side effects for both Self::NotCompleted and Self::Unspecified.
These values correspond to NOT_STARTED, NOT_COMPLETED, and UNSPECIFIED on the wire.
NotCompleted does not prove that an external effect failed; reconcile it or repeat it idempotently.
Unspecified also covers an unknown progress value and must be handled conservatively.
Only Sync can report NotStarted. Async failures always report NotCompleted because an
unpersisted start can replay even if an earlier execution already ran. A disconnect after
hand-out, or an input loading or decoding failure, conservatively reports NotCompleted.
Gracefully returning a task without running it consumes no retry and reports no failure.
if let Some(error) = context.recovery_error() {
match error.attempt_progress() {
dex_sdk::StepAttemptProgress::NotStarted => { /* no handler side effects */ }
_ => { /* reconcile possible side effects before retrying */ }
}
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unspecified
An older Server supplied no progress; treat this like Self::NotCompleted.
NotStarted
No handler ran in any attempt of this Step method call.
NotCompleted
At least one attempt may have run, but no attempt completed.
Trait Implementations§
Source§impl Clone for StepAttemptProgress
impl Clone for StepAttemptProgress
impl Copy for StepAttemptProgress
Source§impl Debug for StepAttemptProgress
impl Debug for StepAttemptProgress
impl Eq for StepAttemptProgress
Source§impl PartialEq for StepAttemptProgress
impl PartialEq for StepAttemptProgress
impl StructuralPartialEq for StepAttemptProgress
Auto Trait Implementations§
impl Forget for StepAttemptProgress
impl Freeze for StepAttemptProgress
impl RefUnwindSafe for StepAttemptProgress
impl Send for StepAttemptProgress
impl Sync for StepAttemptProgress
impl Unpin for StepAttemptProgress
impl UnsafeUnpin for StepAttemptProgress
impl UnwindSafe for StepAttemptProgress
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request