[−][src]Struct hyper_timeout::TimeoutConnector
A connector that enforces as connection timeout
Methods
impl<T: Connect> TimeoutConnector<T>
[src]
pub fn new(connector: T, handle: &Handle) -> Self
[src]
Construct a new TimeoutConnector with a given connector implementing the Connect
trait
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> Service for TimeoutConnector<T> where
T: Service<Error = Error> + 'static,
T::Response: AsyncRead + AsyncWrite,
T::Future: Future<Error = Error>,
[src]
T: Service<Error = Error> + 'static,
T::Response: AsyncRead + AsyncWrite,
T::Future: Future<Error = Error>,
type Request = T::Request
Requests handled by the service.
type Response = TimeoutStream<T::Response>
Responses given by the service.
type Error = T::Error
Errors produced by the service.
type Future = Box<dyn Future<Item = Self::Response, Error = Self::Error>>
The future response value.
fn call(&self, req: Self::Request) -> Self::Future
[src]
Auto Trait Implementations
impl<T> Unpin for TimeoutConnector<T> where
T: Unpin,
T: Unpin,
impl<T> !Sync for TimeoutConnector<T>
impl<T> !Send for TimeoutConnector<T>
impl<T> !UnwindSafe for TimeoutConnector<T>
impl<T> !RefUnwindSafe for TimeoutConnector<T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[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> 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Connect for T where
T: Service<Request = Uri, Error = Error> + 'static,
<T as Service>::Response: AsyncRead,
<T as Service>::Response: AsyncWrite,
<T as Service>::Future: Future,
<<T as Service>::Future as Future>::Error == Error,
[src]
T: Service<Request = Uri, Error = Error> + 'static,
<T as Service>::Response: AsyncRead,
<T as Service>::Response: AsyncWrite,
<T as Service>::Future: Future,
<<T as Service>::Future as Future>::Error == Error,