pub struct WebSocketClientBuilder { /* private fields */ }Expand description
Builder for WebSocket client.
Implementations§
Source§impl WebSocketClientBuilder
impl WebSocketClientBuilder
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Set the connection timeout.
Sourcepub fn max_message_size(self, size: usize) -> Self
pub fn max_message_size(self, size: usize) -> Self
Set the maximum message size.
Sourcepub async fn connect(self) -> WebSocketResult<WebSocketClient>
pub async fn connect(self) -> WebSocketResult<WebSocketClient>
Connect to the WebSocket server.
Trait Implementations§
Source§impl Clone for WebSocketClientBuilder
impl Clone for WebSocketClientBuilder
Source§fn clone(&self) -> WebSocketClientBuilder
fn clone(&self) -> WebSocketClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 WebSocketClientBuilder
impl Debug for WebSocketClientBuilder
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§
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