pub enum BackoffConfig {
Fixed {
delay_ms: u64,
},
Exponential {
initial_delay_ms: u64,
multiplier: f64,
max_delay_ms: Option<u64>,
jitter: bool,
},
Linear {
initial_delay_ms: u64,
increment_ms: u64,
max_delay_ms: Option<u64>,
},
}Expand description
Backoff strategy configuration
Variants§
Implementations§
Source§impl BackoffConfig
impl BackoffConfig
Sourcepub fn to_backoff_strategy(&self) -> BackoffStrategy
pub fn to_backoff_strategy(&self) -> BackoffStrategy
Convert configuration to a backoff strategy
Trait Implementations§
Source§impl Clone for BackoffConfig
impl Clone for BackoffConfig
Source§fn clone(&self) -> BackoffConfig
fn clone(&self) -> BackoffConfig
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 BackoffConfig
impl Debug for BackoffConfig
Source§impl<'de> Deserialize<'de> for BackoffConfig
impl<'de> Deserialize<'de> for BackoffConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackoffConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackoffConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BackoffConfig
impl Serialize for BackoffConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BackoffConfig
impl RefUnwindSafe for BackoffConfig
impl Send for BackoffConfig
impl Sync for BackoffConfig
impl Unpin for BackoffConfig
impl UnsafeUnpin for BackoffConfig
impl UnwindSafe for BackoffConfig
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