Struct simple_hyper_client::ClientBuilder
source · pub struct ClientBuilder { /* private fields */ }
Expand description
A builder for Client
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self
pub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self
Sets the maximum idle connection per host allowed in the pool.
Default is usize::MAX (no limit).
sourcepub fn pool_idle_timeout(&mut self, val: Option<Duration>) -> &mut Self
pub fn pool_idle_timeout(&mut self, val: Option<Duration>) -> &mut Self
Set an optional timeout for idle sockets being kept-alive.
Pass None
to disable timeout.
Default is 90 seconds.
sourcepub fn build<C: NetworkConnector>(&self, connector: C) -> Client
pub fn build<C: NetworkConnector>(&self, connector: C) -> Client
Combine the configuration of this builder with a connector to create a
Client
.