Enum tarantool_rs::ReconnectInterval
source · 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<ReconnectInterval> for ReconnectInterval
impl PartialEq<ReconnectInterval> for ReconnectInterval
source§fn eq(&self, other: &ReconnectInterval) -> bool
fn eq(&self, other: &ReconnectInterval) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ReconnectInterval
Auto Trait Implementations§
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