[−][src]Struct hyper::client::pool::Pool
The NetworkConnector
that behaves as a connection pool used by hyper's Client
.
Implementations
impl Pool<DefaultConnector>
[src]
impl<C: NetworkConnector> Pool<C>
[src]
pub fn with_connector(config: Config, connector: C) -> Pool<C>
[src]
Creates a Pool
with a specified NetworkConnector
.
pub fn set_idle_timeout(&mut self, timeout: Option<Duration>)
[src]
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,
[src]
F: Fn(StaleCheck<C::Stream>) -> Stale + Send + Sync + 'static,
pub fn clear_idle(&mut self)
[src]
Clear all idle connections from the Pool, closing them.
Trait Implementations
impl<C: NetworkConnector<Stream = S>, S: NetworkStream + Send> NetworkConnector for Pool<C>
[src]
type Stream = PooledStream<S>
Type of Stream
to create
fn connect(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<PooledStream<S>>
[src]
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<PooledStream<S>>
Auto Trait Implementations
impl<C> !RefUnwindSafe for Pool<C>
impl<C> Send for Pool<C> where
C: Send,
<C as NetworkConnector>::Stream: Send,
C: Send,
<C as NetworkConnector>::Stream: Send,
impl<C> Sync for Pool<C> where
C: Sync,
<C as NetworkConnector>::Stream: Send,
C: Sync,
<C as NetworkConnector>::Stream: Send,
impl<C> Unpin for Pool<C> where
C: Unpin,
C: Unpin,
impl<C> !UnwindSafe for Pool<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> NetworkConnector for F where
F: Fn(&str, u16, &str) -> Result<TcpStream, Error>,
[src]
F: Fn(&str, u16, &str) -> Result<TcpStream, Error>,
type Stream = HttpStream
Type of Stream
to create
fn connect(&Self, &str, u16, &str) -> Result<HttpStream, Error>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
[src]
T: Any,