Struct chttp::client::ClientBuilder
[−]
[src]
pub struct ClientBuilder { /* fields omitted */ }
An HTTP client builder.
Methods
impl ClientBuilder
[src]
fn max_connections(self, max: Option<u16>) -> Self
[src]
Set the maximum number of connections the client should keep in its connection pool.
To allow simultaneous requests, the client keeps a pool of multiple transports to pull from when performing a request. Reusing transports also improves performance if TCP keepalive is enabled. Increasing this value may improve performance when making many or frequent requests to the same server, but will also use more memory.
Setting this to 0
will cause the client to not reuse any connections and the client will open a new connection
for every request. Setting this to None
will allow unlimited simultaneous connections.
The default value is Some(8)
.
fn options(self, options: Options) -> Self
[src]
Set the connection options to use.
fn build(self) -> Client
[src]
Build an HTTP client using the configured options.
Trait Implementations
impl Clone for ClientBuilder
[src]
fn clone(&self) -> ClientBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for ClientBuilder
[src]
fn default() -> ClientBuilder
[src]
Returns the "default value" for a type. Read more