pub struct WsClientBuilder { /* private fields */ }
Expand description
A WsClientBuilder
can be used to create a HttpClient
with custom configuration.
Implementations§
Source§impl WsClientBuilder
impl WsClientBuilder
Sourcepub fn basic_auth<U, P>(self, username: U, password: Option<P>) -> Self
pub fn basic_auth<U, P>(self, username: U, password: Option<P>) -> Self
Enables basic authentication.
Sourcepub fn bearer_auth<T>(self, token: T) -> Selfwhere
T: Display,
pub fn bearer_auth<T>(self, token: T) -> Selfwhere
T: Display,
Enables bearer authentication.
Sourcepub fn header(self, name: HeaderName, value: HeaderValue) -> Self
pub fn header(self, name: HeaderName, value: HeaderValue) -> Self
Adds a Header
for handshake request.
Sourcepub fn max_concurrent_request_capacity(self, capacity: usize) -> Self
pub fn max_concurrent_request_capacity(self, capacity: usize) -> Self
Sets the max channel capacity of sending request concurrently.
Default is 256.
Sourcepub fn max_capacity_per_subscription(self, capacity: usize) -> Self
pub fn max_capacity_per_subscription(self, capacity: usize) -> Self
Sets the max channel capacity of every subscription stream.
Default is 64.
Trait Implementations§
Source§impl Debug for WsClientBuilder
impl Debug for WsClientBuilder
Auto Trait Implementations§
impl Freeze for WsClientBuilder
impl RefUnwindSafe for WsClientBuilder
impl Send for WsClientBuilder
impl Sync for WsClientBuilder
impl Unpin for WsClientBuilder
impl UnwindSafe for WsClientBuilder
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