pub struct WsConfig {
pub base_delay: Duration,
pub max_delay: Duration,
pub max_attempts: usize,
pub ping_interval: Duration,
pub pong_timeout: Duration,
}Expand description
Configuration for WebSocket reconnection behavior.
Fields§
§base_delay: DurationBase delay between reconnect attempts (default: 1s).
max_delay: DurationMaximum delay between reconnect attempts (default: 60s).
max_attempts: usizeMaximum number of reconnect attempts (default: 10, 0 = infinite).
ping_interval: DurationInterval between ping frames (default: 30s).
pong_timeout: DurationTimeout for pong response before triggering reconnect (default: 60s).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsConfig
impl RefUnwindSafe for WsConfig
impl Send for WsConfig
impl Sync for WsConfig
impl Unpin for WsConfig
impl UnwindSafe for WsConfig
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