[][src]Struct tower_timeout::Timeout

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

Applies a timeout to requests.


impl<T> Timeout<T>[src]

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

Creates a new Timeout

Trait Implementations

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

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

impl<S, Request> Service<Request> for Timeout<S> where
    S: Service<Request>,
    S::Error: Into<Box<dyn Error + Send + Sync>>, 

type Response = S::Response

Responses given by the service.

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

Errors produced by the service.

type Future = ResponseFuture<S::Future>

The future response value.

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.