pub struct WebSocketConfig { /* private fields */ }Expand description
Explicit timeouts and connection retry settings.
Implementations§
Source§impl WebSocketConfig
impl WebSocketConfig
Sourcepub fn new(
handshake_timeout: Duration,
receive_timeout: Duration,
connect_attempts: u32,
retry_delay: Duration,
confirm_login: impl Fn(&ControlEvent) -> Result<bool, WebSocketError> + Send + Sync + 'static,
) -> Result<Self, WebSocketError>
pub fn new( handshake_timeout: Duration, receive_timeout: Duration, connect_attempts: u32, retry_delay: Duration, confirm_login: impl Fn(&ControlEvent) -> Result<bool, WebSocketError> + Send + Sync + 'static, ) -> Result<Self, WebSocketError>
Creates a configuration; timeouts and attempt count must be positive.
Only transient HTTP upgrade/transport failures are retried, before login. Authentication, protocol, and active connection failures are returned.
Trait Implementations§
Source§impl Clone for WebSocketConfig
impl Clone for WebSocketConfig
Auto Trait Implementations§
impl !RefUnwindSafe for WebSocketConfig
impl !UnwindSafe for WebSocketConfig
impl Freeze for WebSocketConfig
impl Send for WebSocketConfig
impl Sync for WebSocketConfig
impl Unpin for WebSocketConfig
impl UnsafeUnpin for WebSocketConfig
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