pub struct WsTransportClientBuilder {
pub certificate_store: CertificateStore,
pub connection_timeout: Duration,
pub headers: HeaderMap,
pub max_request_body_size: u32,
pub max_redirections: usize,
}
Available on crate feature
ws
only.Expand description
Builder for a WebSocket transport Sender
and [’Receiver`] pair.
Fields§
§certificate_store: CertificateStore
What certificate store to use
connection_timeout: Duration
Timeout for the connection.
headers: HeaderMap
Custom headers to pass during the HTTP handshake.
max_request_body_size: u32
Max payload size
max_redirections: usize
Max number of redirections.
Implementations§
source§impl WsTransportClientBuilder
impl WsTransportClientBuilder
sourcepub fn certificate_store(self, certificate_store: CertificateStore) -> Self
pub fn certificate_store(self, certificate_store: CertificateStore) -> Self
Set whether to use system certificates (default is native).
sourcepub fn max_request_body_size(self, size: u32) -> Self
pub fn max_request_body_size(self, size: u32) -> Self
Set max request body size (default is 10 MB).
sourcepub fn connection_timeout(self, timeout: Duration) -> Self
pub fn connection_timeout(self, timeout: Duration) -> Self
Set connection timeout for the handshake (default is 10 seconds).
sourcepub fn set_headers(self, headers: HeaderMap) -> Self
pub fn set_headers(self, headers: HeaderMap) -> Self
Set a custom header passed to the server during the handshake (default is none).
The caller is responsible for checking that the headers do not conflict or are duplicated.
sourcepub fn max_redirections(self, redirect: usize) -> Self
pub fn max_redirections(self, redirect: usize) -> Self
Set the max number of redirections to perform until a connection is regarded as failed. (default is 5).
Trait Implementations§
source§impl Debug for WsTransportClientBuilder
impl Debug for WsTransportClientBuilder
Auto Trait Implementations§
impl RefUnwindSafe for WsTransportClientBuilder
impl Send for WsTransportClientBuilder
impl Sync for WsTransportClientBuilder
impl Unpin for WsTransportClientBuilder
impl UnwindSafe for WsTransportClientBuilder
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