pub struct ConstantBackoffConfig {
pub delay: Duration,
pub max_retries: usize,
pub jitter_enabled: bool,
pub jitter_seed: Option<u64>,
}Expand description
Configuration for Backoff::Constant.
Fields§
§delay: DurationBackoff delay.
Defaults to 500 millis - see defaults::delay.
max_retries: usizeMaximum amount of retries.
Defaults to 4 - see defaults::max_retries.
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 ConstantBackoffConfig
impl Clone for ConstantBackoffConfig
Source§fn clone(&self) -> ConstantBackoffConfig
fn clone(&self) -> ConstantBackoffConfig
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 ConstantBackoffConfig
impl Debug for ConstantBackoffConfig
Source§impl Default for ConstantBackoffConfig
impl Default for ConstantBackoffConfig
Source§impl<'de> Deserialize<'de> for ConstantBackoffConfig
impl<'de> Deserialize<'de> for ConstantBackoffConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ConstantBackoffConfig> for BackoffConfig
impl From<ConstantBackoffConfig> for BackoffConfig
Source§fn from(config: ConstantBackoffConfig) -> BackoffConfig
fn from(config: ConstantBackoffConfig) -> BackoffConfig
Converts to this type from the input type.
Source§impl PartialEq for ConstantBackoffConfig
impl PartialEq for ConstantBackoffConfig
impl Copy for ConstantBackoffConfig
impl StructuralPartialEq for ConstantBackoffConfig
Auto Trait Implementations§
impl Freeze for ConstantBackoffConfig
impl RefUnwindSafe for ConstantBackoffConfig
impl Send for ConstantBackoffConfig
impl Sync for ConstantBackoffConfig
impl Unpin for ConstantBackoffConfig
impl UnwindSafe for ConstantBackoffConfig
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