pub struct WsTransportClientBuilder {
    pub certificate_store: CertificateStore,
    pub connection_timeout: Duration,
    pub headers: HeaderMap,
    pub max_request_body_size: u32,
    pub max_redirections: usize,
}
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§

Set whether to use system certificates (default is native).

Set max request body size (default is 10 MB).

Set connection timeout for the handshake (default is 10 seconds).

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.

Set the max number of redirections to perform until a connection is regarded as failed. (default is 5).

Try to establish the connection.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more