Struct exponential_backoff::Backoff
source · pub struct Backoff { /* private fields */ }
Expand description
Exponential backoff type.
Implementations§
source§impl Backoff
impl Backoff
sourcepub fn set_jitter(&mut self, jitter: f32)
pub fn set_jitter(&mut self, jitter: f32)
Set the amount of jitter per backoff.
§Panics
This method panics if a number smaller than 0
or larger than 1
is
provided.
sourcepub fn set_factor(&mut self, factor: u32)
pub fn set_factor(&mut self, factor: u32)
Set the growth factor for each iteration of the backoff.
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)