pub struct Builder { /* private fields */ }Expand description
Builder to configure a Client
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn ws_config(self, ws_config: WebSocketConfig) -> Self
pub fn ws_config(self, ws_config: WebSocketConfig) -> Self
Configure the WebSocketConfig
Sourcepub fn add_header(self, key: String, value: String) -> Self
pub fn add_header(self, key: String, value: String) -> Self
Add headers to the client connection request.
Sourcepub fn add_sub_protocol(self, key: String, value: String) -> Self
pub fn add_sub_protocol(self, key: String, value: String) -> Self
Add a sub-protocol header to the WebSocket connection.
Sourcepub fn auth_token(self, token: &str) -> Self
pub fn auth_token(self, token: &str) -> Self
Set the authentication token to pass to the server.
Sourcepub fn tls_config(self, tls_config: Arc<ClientConfig>) -> Self
pub fn tls_config(self, tls_config: Arc<ClientConfig>) -> Self
Configure the WebSocketConfig
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl !UnwindSafe for Builder
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