Struct cdrs_tokio::retry::ExponentialReconnectionPolicy
source · pub struct ExponentialReconnectionPolicy { /* private fields */ }
Expand description
A reconnection policy that waits exponentially longer between each reconnection attempt (but keeps a constant delay once a maximum delay is reached). The delay will increase exponentially, with an added jitter.
Implementations§
Trait Implementations§
source§impl Clone for ExponentialReconnectionPolicy
impl Clone for ExponentialReconnectionPolicy
source§fn clone(&self) -> ExponentialReconnectionPolicy
fn clone(&self) -> ExponentialReconnectionPolicy
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 Hash for ExponentialReconnectionPolicy
impl Hash for ExponentialReconnectionPolicy
source§impl Ord for ExponentialReconnectionPolicy
impl Ord for ExponentialReconnectionPolicy
source§fn cmp(&self, other: &ExponentialReconnectionPolicy) -> Ordering
fn cmp(&self, other: &ExponentialReconnectionPolicy) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ExponentialReconnectionPolicy
impl PartialEq for ExponentialReconnectionPolicy
source§fn eq(&self, other: &ExponentialReconnectionPolicy) -> bool
fn eq(&self, other: &ExponentialReconnectionPolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ExponentialReconnectionPolicy
impl PartialOrd for ExponentialReconnectionPolicy
source§fn partial_cmp(&self, other: &ExponentialReconnectionPolicy) -> Option<Ordering>
fn partial_cmp(&self, other: &ExponentialReconnectionPolicy) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ReconnectionPolicy for ExponentialReconnectionPolicy
impl ReconnectionPolicy for ExponentialReconnectionPolicy
source§fn new_node_schedule(&self) -> Box<dyn ReconnectionSchedule + Send + Sync>
fn new_node_schedule(&self) -> Box<dyn ReconnectionSchedule + Send + Sync>
Creates new schedule when a connection needs to be re-established.
impl Copy for ExponentialReconnectionPolicy
impl Eq for ExponentialReconnectionPolicy
impl StructuralPartialEq for ExponentialReconnectionPolicy
Auto Trait Implementations§
impl Freeze for ExponentialReconnectionPolicy
impl RefUnwindSafe for ExponentialReconnectionPolicy
impl Send for ExponentialReconnectionPolicy
impl Sync for ExponentialReconnectionPolicy
impl Unpin for ExponentialReconnectionPolicy
impl UnwindSafe for ExponentialReconnectionPolicy
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