pub struct WebSocketClientBuilder { /* private fields */ }Expand description
Builder for WebSocketClient
Implementations§
Source§impl WebSocketClientBuilder
impl WebSocketClientBuilder
Sourcepub fn with_channel_capacity(self, capacity: usize) -> Self
pub fn with_channel_capacity(self, capacity: usize) -> Self
Set channel capacity
Sourcepub fn with_connection_timeout(self, timeout: Duration) -> Self
pub fn with_connection_timeout(self, timeout: Duration) -> Self
Set connection timeout
Sourcepub fn with_auto_reconnect(self, auto_reconnect: bool) -> Self
pub fn with_auto_reconnect(self, auto_reconnect: bool) -> Self
Enable or disable auto-reconnect
Sourcepub fn with_max_reconnect_attempts(self, attempts: u32) -> Self
pub fn with_max_reconnect_attempts(self, attempts: u32) -> Self
Set maximum reconnection attempts
Sourcepub fn with_reconnect_delay(self, delay: Duration) -> Self
pub fn with_reconnect_delay(self, delay: Duration) -> Self
Set delay between reconnection attempts
Sourcepub fn build(self) -> WebSocketClient
pub fn build(self) -> WebSocketClient
Build the WebSocketClient with the configured options
Auto Trait Implementations§
impl Freeze for WebSocketClientBuilder
impl RefUnwindSafe for WebSocketClientBuilder
impl Send for WebSocketClientBuilder
impl Sync for WebSocketClientBuilder
impl Unpin for WebSocketClientBuilder
impl UnwindSafe for WebSocketClientBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more