pub enum BackoffPolicy {
None,
Constant {
delay_ms: u64,
},
Linear {
initial_ms: u64,
step_ms: u64,
max_ms: Option<u64>,
},
Exponential {
initial_ms: u64,
factor: u32,
max_ms: Option<u64>,
},
Fibonacci {
unit_ms: u64,
max_ms: Option<u64>,
},
}Expand description
Delay strategy for retry/reconnect attempts.
Variants§
None
None variant.
Constant
Constant variant.
Linear
Linear variant.
Fields
Exponential
Exponential variant.
Fields
Fibonacci
Fibonacci variant.
Implementations§
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 Default for BackoffPolicy
impl Default for BackoffPolicy
Source§fn default() -> BackoffPolicy
fn default() -> BackoffPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for BackoffPolicy
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.