pub struct DefaultRetryPolicy;Expand description
Core’s policy: a 429 is retried and holds every request, a 2xx is done,
and every other status fails.
The hold is the schedule’s first delay, RetryConfig::retry_delay at
attempt 0, whatever attempt saw the 429; the attempt’s own wait is the
loop’s floor. A 429 with no retry left still holds: a 429 is a fact
about the host, and the request out of attempts still has to publish it.
Trait Implementations§
Source§impl Clone for DefaultRetryPolicy
impl Clone for DefaultRetryPolicy
impl Copy for DefaultRetryPolicy
Source§impl Debug for DefaultRetryPolicy
impl Debug for DefaultRetryPolicy
Source§impl Default for DefaultRetryPolicy
impl Default for DefaultRetryPolicy
Source§impl RetryPolicy for DefaultRetryPolicy
impl RetryPolicy for DefaultRetryPolicy
Source§fn decide(
&self,
response: &ResponseMeta<'_>,
_attempt: &AttemptInfo,
schedule: &RetryConfig,
) -> Decision
fn decide( &self, response: &ResponseMeta<'_>, _attempt: &AttemptInfo, schedule: &RetryConfig, ) -> Decision
Decide what follows
response. schedule is the loop’s own
RetryConfig, for a policy that sizes a hold from it.Auto Trait Implementations§
impl Freeze for DefaultRetryPolicy
impl RefUnwindSafe for DefaultRetryPolicy
impl Send for DefaultRetryPolicy
impl Sync for DefaultRetryPolicy
impl Unpin for DefaultRetryPolicy
impl UnsafeUnpin for DefaultRetryPolicy
impl UnwindSafe for DefaultRetryPolicy
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