pub enum RetryVerdict {
Retryable,
Recover,
Terminal,
}Expand description
What one failed request permits, decided before any retry is taken (networking doc, Retry Policy Classes: “errors are classified before any retry”).
Variants§
Retryable
A transient failure: a transport failure, any 5xx, 408, 425 or 429. It may be
retried under the surface’s class, its item’s attempt cap and the lane’s retry budget.
Recover
A contract 4xx the recovery matrix names an action for (re-align, re-create, re-send,
merge): the client takes that action, and it charges the same budgets a retry does.
Terminal
A contract refusal the recovery matrix names no action for, or an answer that is not a failure at all: surfaced, never retried.
Implementations§
Source§impl RetryVerdict
impl RetryVerdict
Sourcepub const fn of_transport() -> Self
pub const fn of_transport() -> Self
A request that got no answer: the connection failed, reset, or timed out.
Sourcepub const fn of_status(status: u16, recovery_names_action: bool) -> Self
pub const fn of_status(status: u16, recovery_names_action: bool) -> Self
An answer with HTTP status. recovery_names_action says whether the recovery matrix
names an action for the error.* code the answer carried; it only matters for a 4xx
outside the transient set, because a transient status is retryable whatever its code.
Sourcepub const fn permits_retry(self) -> bool
pub const fn permits_retry(self) -> bool
Whether this verdict permits another request at all.
Trait Implementations§
Source§impl Clone for RetryVerdict
impl Clone for RetryVerdict
Source§fn clone(&self) -> RetryVerdict
fn clone(&self) -> RetryVerdict
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RetryVerdict
Source§impl Debug for RetryVerdict
impl Debug for RetryVerdict
impl Eq for RetryVerdict
Source§impl PartialEq for RetryVerdict
impl PartialEq for RetryVerdict
Source§fn eq(&self, other: &RetryVerdict) -> bool
fn eq(&self, other: &RetryVerdict) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RetryVerdict
Auto Trait Implementations§
impl Freeze for RetryVerdict
impl RefUnwindSafe for RetryVerdict
impl Send for RetryVerdict
impl Sync for RetryVerdict
impl Unpin for RetryVerdict
impl UnsafeUnpin for RetryVerdict
impl UnwindSafe for RetryVerdict
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
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more