[−][src]Struct hyper::client::pool::Pool
The NetworkConnector
that behaves as a connection pool used by hyper's Client
.
Methods
impl Pool<DefaultConnector>
[src]
impl Pool<DefaultConnector>
impl<C: NetworkConnector> Pool<C>
[src]
impl<C: NetworkConnector> Pool<C>
pub fn with_connector(config: Config, connector: C) -> Pool<C>
[src]
pub fn with_connector(config: Config, connector: C) -> Pool<C>
Creates a Pool
with a specified NetworkConnector
.
pub fn set_idle_timeout(&mut self, timeout: Option<Duration>)
[src]
pub fn set_idle_timeout(&mut self, timeout: Option<Duration>)
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]
pub fn set_stale_check<F>(&mut self, callback: F) where
F: Fn(StaleCheck<C::Stream>) -> Stale + Send + Sync + 'static,
pub fn clear_idle(&mut self)
[src]
pub fn clear_idle(&mut self)
Clear all idle connections from the Pool, closing them.
Trait Implementations
impl<C: NetworkConnector<Stream = S>, S: NetworkStream + Send> NetworkConnector for Pool<C>
[src]
impl<C: NetworkConnector<Stream = S>, S: NetworkStream + Send> NetworkConnector for Pool<C>
type Stream = PooledStream<S>
Type of Stream
to create
fn connect(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<PooledStream<S>>
[src]
fn connect(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<PooledStream<S>>
Connect to a remote address.
Auto Trait Implementations
impl<C> Send for Pool<C> where
C: Send,
<C as NetworkConnector>::Stream: Send,
impl<C> Send for Pool<C> where
C: Send,
<C as NetworkConnector>::Stream: Send,
impl<C> Sync for Pool<C> where
C: Sync,
<C as NetworkConnector>::Stream: Send,
impl<C> Sync for Pool<C> where
C: Sync,
<C as NetworkConnector>::Stream: Send,
Blanket Implementations
impl<F> NetworkConnector for F where
F: Fn(&str, u16, &str) -> Result<TcpStream, Error>,
[src]
impl<F> NetworkConnector for F where
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]
fn connect(&Self, &str, u16, &str) -> Result<HttpStream, Error>
Connect to a remote address.
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Typeable for T where
T: Any,
[src]
impl<T> Typeable for T where
T: Any,