#[non_exhaustive]pub enum RetrySchedule {
Fixed(Duration),
Exponential {
min: Duration,
max: Duration,
},
}Expand description
Schedule for the delay between attempts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fixed(Duration)
Fixed delay between every attempt.
Exponential
Exponential backoff: min, min*2, min*4, … capped at max.
Implementations§
Source§impl RetrySchedule
impl RetrySchedule
Trait Implementations§
Source§impl Clone for RetrySchedule
impl Clone for RetrySchedule
Source§fn clone(&self) -> RetrySchedule
fn clone(&self) -> RetrySchedule
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 moreSource§impl Debug for RetrySchedule
impl Debug for RetrySchedule
impl Copy for RetrySchedule
Auto Trait Implementations§
impl Freeze for RetrySchedule
impl RefUnwindSafe for RetrySchedule
impl Send for RetrySchedule
impl Sync for RetrySchedule
impl Unpin for RetrySchedule
impl UnsafeUnpin for RetrySchedule
impl UnwindSafe for RetrySchedule
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