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

pub struct Timeout<T> { /* fields omitted */ }
This is supported on crate feature timeout only.

Applies a timeout to requests.

Implementations

impl<T> Timeout<T>[src]

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

Creates a new Timeout

pub fn get_ref(&self) -> &T[src]

Get a reference to the inner service

pub fn get_mut(&mut self) -> &mut T[src]

Get a mutable reference to the inner service

pub fn into_inner(self) -> T[src]

Consume self, returning the inner service

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<BoxError>, 
[src]

type Response = S::Response

Responses given by the service.

type Error = BoxError

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
[src]

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

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

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

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

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

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

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> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,