pub enum BackOff {
Fixed,
Exponential,
Random,
}Variants§
Fixed
Fixed interval
Exponential
In the exponential backoff strategy, the initial delay is relatively short,
but it gradually increases as the number of retries increases.
Typically, the delay time is calculated by multiplying a base value with an exponential factor.
For example, the delay time might be calculated as base_value * (2 ^ retry_count).
Random
Trait Implementations§
source§impl<'de> Deserialize<'de> for BackOff
impl<'de> Deserialize<'de> for BackOff
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
Auto Trait Implementations§
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