pub enum RetryFlow {
Permanent(Error),
Exhausted(Error),
Continue(Error),
}Expand description
The result of a retry policy decision.
If the caller should continue retrying the policy returns Continue. If the caller should stop retrying, the policy returns Break.
In both variants the result includes an error. This is useful when retry
policies are composed. The inner policy returns Continue based on the
error type, and the outer policy may return Break based on the number
errors, or the elapsed time.
Variants§
Permanent(Error)
Stop the retry loop because this is a permanent error.
Exhausted(Error)
Stop the retry loop. The error is retryable, but the retry attempts are exhausted.
Continue(Error)
The error was retryable, continue the retry loop.
Implementations§
Source§impl RetryFlow
impl RetryFlow
pub fn is_permanent(&self) -> bool
pub fn is_exhausted(&self) -> bool
pub fn is_continue(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetryFlow
impl !RefUnwindSafe for RetryFlow
impl Send for RetryFlow
impl Sync for RetryFlow
impl Unpin for RetryFlow
impl !UnwindSafe for RetryFlow
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