pub struct ExponentialBackoffConfig {
pub initial_delay: Duration,
pub factor: f32,
pub max_delay: Duration,
pub max_retries: usize,
pub max_total_delay: Duration,
pub jitter_enabled: bool,
pub jitter_seed: Option<u64>,
}Expand description
Configuration for Backoff::Exponential.
Fields§
§initial_delay: DurationInitial backoff delay.
Defaults to 500 millis - see defaults::delay.
factor: f32Backoff factor.
Defaults to 2.0 - see defaults::factor.
max_delay: DurationMaximum backoff delay.
Defaults to 30 seconds - see defaults::max_delay.
max_retries: usizeMaximum amount of retries.
Defaults to 4 - see defaults::max_retries.
max_total_delay: DurationMaximum total backoff delay.
Defaults to 60 seconds - see defaults::max_total_delay
jitter_enabled: boolWhether jitter is enabled.
Defaults to true - see defaults::jitter_enabled.
jitter_seed: Option<u64>Random seed to initialize the random jitter generator.
Defaults to None - see defaults::jitter_seed.
Trait Implementations§
Source§impl Clone for ExponentialBackoffConfig
impl Clone for ExponentialBackoffConfig
Source§fn clone(&self) -> ExponentialBackoffConfig
fn clone(&self) -> ExponentialBackoffConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExponentialBackoffConfig
impl Debug for ExponentialBackoffConfig
Source§impl Default for ExponentialBackoffConfig
impl Default for ExponentialBackoffConfig
Source§fn default() -> Self
fn default() -> Self
Return ExponentialBackoffConfig { initial_delay: defaults::delay(), factor: defaults::factor(), max_delay: defaults::max_delay(), max_retries: defaults::max_retries(), max_total_delay: defaults::max_total_delay(), jitter_enabled: defaults::jitter_enabled(), jitter_seed: defaults::jitter_seed() }