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.