Struct hyper::client::Config
[−]
[src]
pub struct Config<C, B> { /* fields omitted */ }
Configuration for a Client
Methods
impl<C, B> Config<C, B>
[src]
fn body<BB>(self) -> Config<C, BB>
[src]
Set the body stream to be used by the Client
.
Example
let cfg = Config::default() .body::<hyper::Body>();
fn connector<CC>(self, val: CC) -> Config<CC, B>
[src]
Set the Connect
type to be used.
fn keep_alive(self, val: bool) -> Config<C, B>
[src]
Enable or disable keep-alive mechanics.
Default is enabled.
fn keep_alive_timeout(self, val: Option<Duration>) -> Config<C, B>
[src]
Set an optional timeout for idle sockets being kept-alive.
Pass None
to disable timeout.
Default is 90 seconds.
fn no_proto(self) -> Config<C, B>
[src]
Disable tokio-proto internal usage.
impl<C, B> Config<C, B> where
C: Connect,
B: Stream<Error = Error>,
B::Item: AsRef<[u8]>,
[src]
C: Connect,
B: Stream<Error = Error>,
B::Item: AsRef<[u8]>,
impl<B> Config<UseDefaultConnector, B> where
B: Stream<Error = Error>,
B::Item: AsRef<[u8]>,
[src]
B: Stream<Error = Error>,
B::Item: AsRef<[u8]>,
fn build(self, handle: &Handle) -> Client<HttpConnector, B>
[src]
Construct the Client with this configuration.
Trait Implementations
impl Default for Config<UseDefaultConnector, Body>
[src]
fn default() -> Config<UseDefaultConnector, Body>
[src]
Returns the "default value" for a type. Read more