pub struct WebSocketClientBuilder { /* private fields */ }Expand description
Builder for WebSocketClient
Implementations§
Source§impl WebSocketClientBuilder
impl WebSocketClientBuilder
Sourcepub fn config(self, config: ClientConfig) -> Self
pub fn config(self, config: ClientConfig) -> Self
Set client configuration
Sourcepub const fn receive_timeout(self, timeout: Duration) -> Self
pub const fn receive_timeout(self, timeout: Duration) -> Self
Set receive timeout
Sourcepub fn retry_strategy<S: RetryStrategy + 'static>(self, strategy: S) -> Self
pub fn retry_strategy<S: RetryStrategy + 'static>(self, strategy: S) -> Self
Set retry strategy
Sourcepub fn handshaker<H: Handshaker + 'static>(self, handshaker: H) -> Self
pub fn handshaker<H: Handshaker + 'static>(self, handshaker: H) -> Self
Set handshaker
Sourcepub fn exponential_backoff(
self,
initial: Duration,
max: Duration,
multiplier: f64,
) -> Self
pub fn exponential_backoff( self, initial: Duration, max: Duration, multiplier: f64, ) -> Self
Use exponential backoff with custom parameters
Sourcepub fn build(self) -> WebSocketClient
pub fn build(self) -> WebSocketClient
Build the client
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