pub enum ReconnectInterval {
Fixed(Duration),
ExponentialBackoff {
min: Duration,
max: Duration,
randomization_factor: f64,
multiplier: f64,
},
}
Expand description
Interval parameters for background reconnection.
Variants§
Implementations§
Source§impl ReconnectInterval
impl ReconnectInterval
Sourcepub fn exponential_backoff(
min_interval: Duration,
max_interval: Duration,
randomization_factor: f64,
multiplier: f64,
) -> Self
pub fn exponential_backoff( min_interval: Duration, max_interval: Duration, randomization_factor: f64, multiplier: f64, ) -> Self
Interval between reconnection attempts calculated as exponentially growing period.
For details on this values check backoff::ExponentialBackoff
docs.
Trait Implementations§
Source§impl Clone for ReconnectInterval
impl Clone for ReconnectInterval
Source§fn clone(&self) -> ReconnectInterval
fn clone(&self) -> ReconnectInterval
Returns a copy 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 ReconnectInterval
impl Debug for ReconnectInterval
Source§impl Default for ReconnectInterval
impl Default for ReconnectInterval
Source§impl PartialEq for ReconnectInterval
impl PartialEq for ReconnectInterval
impl StructuralPartialEq for ReconnectInterval
Auto Trait Implementations§
impl Freeze for ReconnectInterval
impl RefUnwindSafe for ReconnectInterval
impl Send for ReconnectInterval
impl Sync for ReconnectInterval
impl Unpin for ReconnectInterval
impl UnwindSafe for ReconnectInterval
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