[][src]Struct hyper::client::Builder

pub struct Builder { /* fields omitted */ }

Builder for a Client

Methods

impl Builder
[src]

Enable or disable keep-alive mechanics.

Default is enabled.

Set an optional timeout for idle sockets being kept-alive.

Pass None to disable timeout.

Default is 90 seconds.

Set whether HTTP/1 connections should try to use vectored writes, or always flatten into a single buffer.

Note that setting this to false may mean more copies of body data, but may also improve performance when an IO transport doesn't support vectored writes well, such as most TLS implementations.

Default is true.

Sets the exact size of the read buffer to always use.

Default is an adaptive read buffer.

Set whether HTTP/1 connections will write header names as title case at the socket level.

Note that this setting does not affect HTTP/2.

Default is false.

Set whether the connection must use HTTP/2.

The destination must either allow HTTP2 Prior Knowledge, or the Connect should be configured to do use ALPN to upgrade to h2 as part of the connection process. This will not make the Client utilize ALPN by itself.

Note that setting this to true prevents HTTP/1 from being allowed.

Default is false.

Sets the maximum idle connection per host allowed in the pool.

Default is usize::MAX (no limit).

Set whether to retry requests that get disrupted before ever starting to write.

This means a request that is queued, and gets given an idle, reused connection, and then encounters an error immediately as the idle connection was found to be unusable.

When this is set to false, the related ResponseFuture would instead resolve to an Error::Cancel.

Default is true.

Set whether to automatically add the Host header to requests.

If true, and a request does not include a Host header, one will be added automatically, derived from the authority of the Uri.

Default is true.

Provide an executor to execute background Connection tasks.

Builder a client with this configuration and the default HttpConnector.

Combine the configuration of this builder with a connector to create a Client.

Trait Implementations

impl Clone for Builder
[src]

Performs copy-assignment from source. Read more

impl Default for Builder
[src]

impl Debug for Builder
[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T