pub struct ReconnectConfig {
pub initial_backoff: Duration,
pub max_backoff: Duration,
pub multiplier: u32,
pub jitter: JitterMode,
}Expand description
Configuration for the subscriber’s reconnect behavior.
The backoff sequence is min(initial * multiplier^attempt, max),
then passed through JitterMode to produce the actual sleep
duration. On a successful read (see ReadOutcome::Connected),
the attempt counter resets to zero.
Fields§
§initial_backoff: Duration§max_backoff: Duration§multiplier: u32§jitter: JitterModeTrait Implementations§
Source§impl Clone for ReconnectConfig
impl Clone for ReconnectConfig
Source§fn clone(&self) -> ReconnectConfig
fn clone(&self) -> ReconnectConfig
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 ReconnectConfig
impl Debug for ReconnectConfig
Source§impl Default for ReconnectConfig
impl Default for ReconnectConfig
impl Copy for ReconnectConfig
Auto Trait Implementations§
impl Freeze for ReconnectConfig
impl RefUnwindSafe for ReconnectConfig
impl Send for ReconnectConfig
impl Sync for ReconnectConfig
impl Unpin for ReconnectConfig
impl UnsafeUnpin for ReconnectConfig
impl UnwindSafe for ReconnectConfig
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