pub enum Backoff {
Exponential {
initial: Duration,
max: Duration,
},
Custom(fn(u32) -> Duration),
}Expand description
How long to wait before trying a failed job again.
Variants§
Exponential
initial after the first failure, doubling after each one after
it, and never more than max.
Custom(fn(u32) -> Duration)
What the function says, given how many attempts have failed, one for the first: for a schedule of the application’s own, such as another server’s it is to behave as.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Backoff
impl RefUnwindSafe for Backoff
impl Send for Backoff
impl Sync for Backoff
impl Unpin for Backoff
impl UnsafeUnpin for Backoff
impl UnwindSafe for Backoff
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