pub struct RetryPolicy {
pub max_retries: u32,
pub base_delay: Duration,
pub max_delay: Duration,
pub retry_status: Vec<u16>,
}Expand description
Automatic-retry tuning. See the module docs for the retry semantics; disable with
RetryPolicy::disabled or tune via crate::ManagerClientBuilder::retry.
Fields§
§max_retries: u32Retry attempts after the initial request. 0 disables retries.
base_delay: DurationBase backoff; grows exponentially per attempt (with full jitter).
max_delay: DurationUpper bound on any single backoff. Also caps a server-sent Retry-After.
retry_status: Vec<u16>Response status codes that trigger a retry. Default: 429, 502, 503, 504.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
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
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