pub struct WsConfig {
pub initial_backoff: Duration,
pub max_backoff: Duration,
pub max_reconnect_attempts: Option<u32>,
pub ping_interval: Duration,
pub pong_timeout: Duration,
}Expand description
Configuration for WebSocket connections.
Fields§
§initial_backoff: DurationInitial backoff duration for reconnection.
max_backoff: DurationMaximum backoff duration for reconnection.
max_reconnect_attempts: Option<u32>Maximum number of reconnection attempts (None = infinite).
ping_interval: DurationPing interval for connection health checks.
pong_timeout: DurationPong timeout - disconnect if no pong received.
Implementations§
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