pub enum RetryClass {
Retry,
RetryAfter,
Fallback,
Fatal,
}Expand description
What the caller may do after a failure (spec §20.7).
Variants§
Retry
Retry the same provider after the policy’s backoff.
RetryAfter
Retry the same provider, but not before the delay the provider asked
for (see ProviderErrorKind::retry_after).
Fallback
Do not retry this provider; move to the next candidate.
Fatal
Fail the stage.
Implementations§
Source§impl RetryClass
impl RetryClass
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable snake-case label for metrics and replay records.
Sourcepub const fn allows_same_provider(self) -> bool
pub const fn allows_same_provider(self) -> bool
Returns true when the same provider may be called again.
Sourcepub const fn allows_another_candidate(self) -> bool
pub const fn allows_another_candidate(self) -> bool
Returns true when another candidate may be tried.
Trait Implementations§
Source§impl Clone for RetryClass
impl Clone for RetryClass
impl Copy for RetryClass
Source§impl Debug for RetryClass
impl Debug for RetryClass
Source§impl<'de> Deserialize<'de> for RetryClass
impl<'de> Deserialize<'de> for RetryClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RetryClass
impl Display for RetryClass
impl Eq for RetryClass
Source§impl Hash for RetryClass
impl Hash for RetryClass
Source§impl Ord for RetryClass
impl Ord for RetryClass
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RetryClass
impl PartialEq for RetryClass
Source§impl PartialOrd for RetryClass
impl PartialOrd for RetryClass
Source§impl Serialize for RetryClass
impl Serialize for RetryClass
impl StructuralPartialEq for RetryClass
Auto Trait Implementations§
impl Freeze for RetryClass
impl RefUnwindSafe for RetryClass
impl Send for RetryClass
impl Sync for RetryClass
impl Unpin for RetryClass
impl UnsafeUnpin for RetryClass
impl UnwindSafe for RetryClass
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.