pub struct ReconnectConfig {
pub initial_delay: Duration,
pub max_delay: Duration,
pub growth_factor: f64,
pub max_retries: Option<u32>,
pub jitter_factor: f64,
pub reset_on_success: bool,
pub success_threshold: Duration,
pub circuit_breaker_threshold: Option<u32>,
pub circuit_breaker_timeout: Duration,
}Available on non-WebAssembly only.
Expand description
Reconnection configuration.
Fields§
§initial_delay: DurationInitial delay before first reconnection attempt.
max_delay: DurationMaximum delay between reconnection attempts.
growth_factor: f64Factor by which delay grows after each failure.
max_retries: Option<u32>Maximum number of reconnection attempts (None for unlimited).
jitter_factor: f64Jitter factor (0.0 to 1.0) to randomize delays.
reset_on_success: boolWhether to reset delay after successful connection.
success_threshold: DurationMinimum time a connection must be alive to be considered successful.
circuit_breaker_threshold: Option<u32>Circuit breaker threshold (failures before circuit opens).
circuit_breaker_timeout: DurationCircuit breaker reset timeout.
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 (const: unstable) · 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 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