pub enum RetryStrategy {
NoRetry,
Fixed {
delay: Duration,
max_attempts: usize,
},
ExponentialBackoff {
initial_delay: Duration,
max_delay: Duration,
max_attempts: usize,
multiplier: f64,
},
}Expand description
Error recovery strategy
Variants§
NoRetry
No retry, fail immediately
Fixed
Retry with fixed delay
ExponentialBackoff
Retry with exponential backoff
Implementations§
Source§impl RetryStrategy
impl RetryStrategy
Trait Implementations§
Source§impl Clone for RetryStrategy
impl Clone for RetryStrategy
Source§fn clone(&self) -> RetryStrategy
fn clone(&self) -> RetryStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RetryStrategy
impl RefUnwindSafe for RetryStrategy
impl Send for RetryStrategy
impl Sync for RetryStrategy
impl Unpin for RetryStrategy
impl UnwindSafe for RetryStrategy
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