[][src]Struct tower::timeout::Timeout

pub struct Timeout<T> { /* fields omitted */ }

Applies a timeout to requests.

Methods

impl<T> Timeout<T>[src]

pub fn new(inner: T, timeout: Duration) -> Timeout<T>[src]

Creates a new Timeout

Trait Implementations

impl<T> Clone for Timeout<T> where
    T: Clone
[src]

impl<S, Request> Service<Request> for Timeout<S> where
    S: Service<Request>,
    Box<dyn Error + 'static + Sync + Send>: From<<S as Service<Request>>::Error>, 
[src]

type Response = <S as Service<Request>>::Response

Responses given by the service.

type Error = Box<dyn Error + 'static + Sync + Send>

Errors produced by the service.

type Future = ResponseFuture<<S as Service<Request>>::Future>

The future response value.

impl<T> Debug for Timeout<T> where
    T: Debug
[src]

Auto Trait Implementations

impl<T> Send for Timeout<T> where
    T: Send

impl<T> Unpin for Timeout<T> where
    T: Unpin

impl<T> Sync for Timeout<T> where
    T: Sync

impl<T> UnwindSafe for Timeout<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Timeout<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]