pub struct RetryPolicy {
pub max_retries: u32,
pub initial_backoff: Duration,
pub backoff_multiplier: f64,
pub max_backoff: Duration,
pub total_deadline: Duration,
}Expand description
Retry policy applied by the core transport layer.
Fields§
§max_retries: u32Maximum number of retry attempts after the initial request. 0 disables retries.
initial_backoff: DurationInitial backoff between the first and second attempt.
backoff_multiplier: f64Backoff multiplier between attempts.
max_backoff: DurationCap on a single backoff interval.
total_deadline: DurationUpper bound on total time spent retrying a single logical request.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
Sourcepub fn none() -> RetryPolicy
pub fn none() -> RetryPolicy
Policy that disables all retries. Used primarily for determinism in tests.
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryPolicy
impl Debug for RetryPolicy
Source§impl Default for RetryPolicy
impl Default for RetryPolicy
Source§fn default() -> RetryPolicy
fn default() -> RetryPolicy
Returns the “default value” for a type. Read more
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