Struct hyper::client::Config [] [src]

pub struct Config<C, B> { /* fields omitted */ }

Configuration for a Client

Methods

impl<C, B> Config<C, B>
[src]

[src]

Set the body stream to be used by the Client.

Example

let cfg = Config::default()
    .body::<hyper::Body>();

[src]

Set the Connect type to be used.

[src]

Enable or disable keep-alive mechanics.

Default is enabled.

[src]

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

Pass None to disable timeout.

Default is 90 seconds.

[src]

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.

[src]

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 FutureResponse would instead resolve to an Error::Cancel.

Default is true.

impl<C, B> Config<C, B> where
    C: Connect,
    B: Stream<Error = Error>,
    B::Item: AsRef<[u8]>, 
[src]

[src]

Construct the Client with this configuration.

[src]

Construct a Client with this configuration and an executor.

The executor will be used to spawn "background" connection tasks to drive requests and responses.

impl<B> Config<UseDefaultConnector, B> where
    B: Stream<Error = Error>,
    B::Item: AsRef<[u8]>, 
[src]

[src]

Construct the Client with this configuration.

Trait Implementations

impl Default for Config<UseDefaultConnector, Body>
[src]

[src]

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

impl<C, B> Debug for Config<C, B>
[src]

[src]

Formats the value using the given formatter.

impl<C: Clone, B> Clone for Config<C, B>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more