pub struct RetryOptions {
pub max_attempts: u32,
pub initial_delay: Duration,
pub backoff_factor: f64,
pub retry_rate_limit: bool,
}Expand description
How with_retry behaves.
Fields§
§max_attempts: u32Total number of attempts including the first. Default: 3.
initial_delay: DurationDelay before the first retry. Default: 1s.
backoff_factor: f64Exponential backoff multiplier. Default: 2.
retry_rate_limit: boolAlso retry a 429, waiting out Retry-After when the API sent one.
Off by default: a rate limit asks you to slow the whole client down, and retrying one call in place papers over that.
Trait Implementations§
Source§impl Clone for RetryOptions
impl Clone for RetryOptions
Source§impl Debug for RetryOptions
impl Debug for RetryOptions
Auto Trait Implementations§
impl Freeze for RetryOptions
impl RefUnwindSafe for RetryOptions
impl Send for RetryOptions
impl Sync for RetryOptions
impl Unpin for RetryOptions
impl UnsafeUnpin for RetryOptions
impl UnwindSafe for RetryOptions
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