pub struct HttpRetryPolicy {
pub max_attempts: u32,
pub base_delay: Duration,
pub max_delay: Duration,
}Expand description
How many times to retry and how long to wait between tries.
Fields§
§max_attempts: u32Total attempts including the first. 1 disables retry.
base_delay: DurationFirst backoff; doubles each subsequent attempt.
max_delay: DurationUpper bound on any single backoff (also caps a server Retry-After).
Implementations§
Trait Implementations§
Source§impl Clone for HttpRetryPolicy
impl Clone for HttpRetryPolicy
Source§impl Debug for HttpRetryPolicy
impl Debug for HttpRetryPolicy
Auto Trait Implementations§
impl Freeze for HttpRetryPolicy
impl RefUnwindSafe for HttpRetryPolicy
impl Send for HttpRetryPolicy
impl Sync for HttpRetryPolicy
impl Unpin for HttpRetryPolicy
impl UnsafeUnpin for HttpRetryPolicy
impl UnwindSafe for HttpRetryPolicy
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