pub struct RetryLayer { /* private fields */ }Expand description
Configures exponential-backoff retries for retryable errors.
Implementations§
Source§impl RetryLayer
impl RetryLayer
Sourcepub fn exponential(attempts: u32, base: Duration) -> RetryLayer
pub fn exponential(attempts: u32, base: Duration) -> RetryLayer
attempts total tries with exponential backoff starting at base.
Sourcepub fn max_backoff(self, max: Duration) -> RetryLayer
pub fn max_backoff(self, max: Duration) -> RetryLayer
Cap the backoff delay.
Trait Implementations§
Source§impl Clone for RetryLayer
impl Clone for RetryLayer
Source§fn clone(&self) -> RetryLayer
fn clone(&self) -> RetryLayer
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 moreimpl Copy for RetryLayer
Source§impl Debug for RetryLayer
impl Debug for RetryLayer
Auto Trait Implementations§
impl Freeze for RetryLayer
impl RefUnwindSafe for RetryLayer
impl Send for RetryLayer
impl Sync for RetryLayer
impl Unpin for RetryLayer
impl UnsafeUnpin for RetryLayer
impl UnwindSafe for RetryLayer
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