pub struct ReconnectionConfig {
pub base_interval: Duration,
pub max_interval: Duration,
pub max_attempts: Option<u32>,
pub use_jitter: bool,
}Expand description
Configuration settings for connection retry and backoff strategy
Fields§
§base_interval: DurationBase duration for reconnect interval (used with exponential backoff)
max_interval: DurationMaximum reconnect interval (cap for exponential backoff)
max_attempts: Option<u32>Maximum number of reconnection attempts.
Use None for unlimited attempts.
use_jitter: boolWhether to add jitter to reconnection times (prevents thundering herd problem)
Trait Implementations§
Source§impl Clone for ReconnectionConfig
impl Clone for ReconnectionConfig
Source§fn clone(&self) -> ReconnectionConfig
fn clone(&self) -> ReconnectionConfig
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 ReconnectionConfig
impl Debug for ReconnectionConfig
Auto Trait Implementations§
impl Freeze for ReconnectionConfig
impl RefUnwindSafe for ReconnectionConfig
impl Send for ReconnectionConfig
impl Sync for ReconnectionConfig
impl Unpin for ReconnectionConfig
impl UnwindSafe for ReconnectionConfig
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