pub enum BackoffPolicy {
Fixed {
delay: Duration,
},
Exponential {
base_delay: Duration,
max_delay: Duration,
},
}Expand description
Backoff policy for retryable errors.
Variants§
Fixed
Retry after the same delay for every attempt.
Exponential
Increase the retry delay between attempts until reaching a cap.
Trait Implementations§
Source§impl Clone for BackoffPolicy
impl Clone for BackoffPolicy
Source§fn clone(&self) -> BackoffPolicy
fn clone(&self) -> BackoffPolicy
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 BackoffPolicy
impl Debug for BackoffPolicy
Source§impl<'de> Deserialize<'de> for BackoffPolicy
impl<'de> Deserialize<'de> for BackoffPolicy
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 PartialEq for BackoffPolicy
impl PartialEq for BackoffPolicy
Source§impl Serialize for BackoffPolicy
impl Serialize for BackoffPolicy
impl Eq for BackoffPolicy
impl StructuralPartialEq for BackoffPolicy
Auto Trait Implementations§
impl Freeze for BackoffPolicy
impl RefUnwindSafe for BackoffPolicy
impl Send for BackoffPolicy
impl Sync for BackoffPolicy
impl Unpin for BackoffPolicy
impl UnsafeUnpin for BackoffPolicy
impl UnwindSafe for BackoffPolicy
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