[−][src]Struct hyper_timeout::TimeoutConnector
A connector that enforces as connection timeout
Methods
impl<T: Connect> TimeoutConnector<T>
[src]
pub fn new(connector: T) -> Self
[src]
Construct a new TimeoutConnector with a given connector implementing the Connect
trait
impl<T> TimeoutConnector<T>
[src]
pub fn set_connect_timeout(&mut self, val: Option<Duration>)
[src]
Set the timeout for connecting to a URL.
Default is no timeout.
pub fn set_read_timeout(&mut self, val: Option<Duration>)
[src]
Set the timeout for the response.
Default is no timeout.
pub fn set_write_timeout(&mut self, val: Option<Duration>)
[src]
Set the timeout for the request.
Default is no timeout.
Trait Implementations
impl<T: Debug> Debug for TimeoutConnector<T>
[src]
impl<T: Connect> Connect for TimeoutConnector<T> where
T: Connect<Error = Error> + 'static,
T::Future: 'static,
[src]
T: Connect<Error = Error> + 'static,
T::Future: 'static,
type Transport = TimeoutStream<T::Transport>
The connected IO Stream.
type Error = T::Error
An error occured when trying to connect.
type Future = Box<dyn Future<Item = (Self::Transport, Connected), Error = Self::Error> + Send>
A Future that will resolve to the connected Transport.
fn connect(&self, dst: Destination) -> Self::Future
[src]
Auto Trait Implementations
impl<T> Sync for TimeoutConnector<T> where
T: Sync,
T: Sync,
impl<T> Send for TimeoutConnector<T> where
T: Send,
T: Send,
impl<T> Unpin for TimeoutConnector<T> where
T: Unpin,
T: Unpin,
impl<T> RefUnwindSafe for TimeoutConnector<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for TimeoutConnector<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,