Struct chttp::client::ClientBuilder [] [src]

pub struct ClientBuilder { /* fields omitted */ }

An HTTP client builder.

Methods

impl ClientBuilder
[src]

[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).

[src]

Set the connection options to use.

[src]

Build an HTTP client using the configured options.

Trait Implementations

impl Clone for ClientBuilder
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for ClientBuilder
[src]

[src]

Returns the "default value" for a type. Read more