pub struct RetryPolicy {
pub max_attempts: u32,
pub initial_backoff: Duration,
pub multiplier: f64,
pub max_backoff: Duration,
pub jitter: bool,
}Expand description
Retry behaviour for retryable failures.
Fields§
§max_attempts: u32Total attempts including the first one (>= 1).
initial_backoff: DurationBackoff before the first retry.
multiplier: f64Growth factor of the backoff per retry.
max_backoff: DurationUpper bound on the backoff.
jitter: boolFull jitter: the delay is uniformly drawn from [0, backoff].
Implementations§
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
impl Copy for RetryPolicy
Source§impl Debug for RetryPolicy
impl Debug for RetryPolicy
Source§impl Default for RetryPolicy
impl Default for RetryPolicy
Source§impl PartialEq for RetryPolicy
impl PartialEq for RetryPolicy
impl StructuralPartialEq for RetryPolicy
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin for RetryPolicy
impl UnwindSafe for RetryPolicy
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