Struct hyper::client::Config
[−]
[src]
pub struct Config<C> { /* fields omitted */ }
Configuration for a Client
Methods
impl<C: Connect> Config<C>
[src]
fn connector<CC: Connect>(self, val: CC) -> Config<CC>
Set the Connect
type to be used.
fn keep_alive(self, val: bool) -> Config<C>
Enable or disable keep-alive mechanics.
Default is enabled.
fn keep_alive_timeout(self, val: Option<Duration>) -> Config<C>
Set an optional timeout for idle sockets being kept-alive.
Pass None
to disable timeout.
Default is 2 minutes.
fn max_sockets(self, val: usize) -> Config<C>
Set the max table size allocated for holding on to live sockets.
Default is 1024.
fn connect_timeout(self, val: Duration) -> Config<C>
Set the timeout for connecting to a URL.
Default is 10 seconds.
fn dns_workers(self, workers: usize) -> Config<C>
Set number of Dns workers to use for this client
Default is 4
fn build(self) -> Result<Client<C>>
Construct the Client with this configuration.
Trait Implementations
impl<C: Debug> Debug for Config<C>
[src]
impl<C: Clone> Clone for Config<C>
[src]
fn clone(&self) -> Config<C>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for Config<DefaultConnector>
[src]
fn default() -> Config<DefaultConnector>
Returns the "default value" for a type. Read more