Struct hyper::client::pool::Pool [−][src]
pub struct Pool<C: NetworkConnector> { /* fields omitted */ }
Expand description
The NetworkConnector
that behaves as a connection pool used by hyper’s Client
.
Implementations
Creates a Pool
with a specified NetworkConnector
.
Set a duration for how long an idle connection is still valid.
pub fn set_stale_check<F>(&mut self, callback: F) where
F: Fn(StaleCheck<'_, C::Stream>) -> Stale + Send + Sync + 'static,
Clear all idle connections from the Pool, closing them.
Trait Implementations
type Stream = PooledStream<S>
type Stream = PooledStream<S>
Type of Stream
to create