pub struct RetryContext {
pub fail_count: NonZeroU32,
pub slept_so_far: Duration,
pub error: InvocationError,
}Expand description
Context passed to RetryPolicy::should_retry on each failure.
Fields§
§fail_count: NonZeroU32Number of times this request has failed (starts at 1).
slept_so_far: DurationTotal time already slept for this request across all prior retries.
error: InvocationErrorThe most recent error.
Auto Trait Implementations§
impl !RefUnwindSafe for RetryContext
impl !UnwindSafe for RetryContext
impl Freeze for RetryContext
impl Send for RetryContext
impl Sync for RetryContext
impl Unpin for RetryContext
impl UnsafeUnpin for RetryContext
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