pub struct ReconnectConfig {
pub initial_backoff: Duration,
pub max_backoff: Duration,
pub multiplier: f64,
pub max_attempts: u32,
}Expand description
Configuration for automatic reconnect with exponential backoff.
Fields§
§initial_backoff: DurationInitial delay before the first reconnect attempt. Default: 1 second.
max_backoff: DurationMaximum delay between reconnect attempts. Default: 60 seconds.
multiplier: f64Multiplier applied to backoff after each failed attempt. Default: 2.0.
max_attempts: u32Maximum number of reconnect attempts. 0 = unlimited. Default: 0.
Trait 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
Auto Trait Implementations§
impl Freeze for ReconnectConfig
impl RefUnwindSafe for ReconnectConfig
impl Send for ReconnectConfig
impl Sync for ReconnectConfig
impl Unpin 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