#[non_exhaustive]pub enum RetryAction {
Retry,
RetryAfter(Duration),
GiveUp,
}Available on crate feature
std only.Expand description
What to do with an error a retried operation returned.
A classifier (see Retry::run) inspects each error and returns one of
these. #[non_exhaustive] so future actions do not break callers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Retry
Retry, waiting the policy’s computed backoff delay.
RetryAfter(Duration)
Retry, but wait at least this long — a server-supplied Retry-After
override, honored when Retry::respect_retry_after is set.
GiveUp
Stop and return the error to the caller.
Trait Implementations§
Source§impl Clone for RetryAction
impl Clone for RetryAction
Source§fn clone(&self) -> RetryAction
fn clone(&self) -> RetryAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RetryAction
Source§impl Debug for RetryAction
impl Debug for RetryAction
impl Eq for RetryAction
Source§impl PartialEq for RetryAction
impl PartialEq for RetryAction
Source§fn eq(&self, other: &RetryAction) -> bool
fn eq(&self, other: &RetryAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RetryAction
Auto Trait Implementations§
impl Freeze for RetryAction
impl RefUnwindSafe for RetryAction
impl Send for RetryAction
impl Sync for RetryAction
impl Unpin for RetryAction
impl UnsafeUnpin for RetryAction
impl UnwindSafe for RetryAction
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