pub struct BackoffOptions {
pub min_backoff: Duration,
pub max_backoff: Duration,
pub random_factor: f64,
pub max_restarts: Option<u32>,
}Fields§
§min_backoff: Duration§max_backoff: Duration§random_factor: f64§max_restarts: Option<u32>Implementations§
Source§impl BackoffOptions
impl BackoffOptions
pub fn next_delay(&self, attempt: u32) -> Duration
Trait Implementations§
Source§impl Clone for BackoffOptions
impl Clone for BackoffOptions
Source§fn clone(&self) -> BackoffOptions
fn clone(&self) -> BackoffOptions
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 BackoffOptions
impl Debug for BackoffOptions
Auto Trait Implementations§
impl Freeze for BackoffOptions
impl RefUnwindSafe for BackoffOptions
impl Send for BackoffOptions
impl Sync for BackoffOptions
impl Unpin for BackoffOptions
impl UnsafeUnpin for BackoffOptions
impl UnwindSafe for BackoffOptions
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