[][src]Struct ntex::util::timeout::Timeout

pub struct Timeout<E = ()> { /* fields omitted */ }

Applies a timeout to requests.

Timeout transform is disabled if timeout is set to 0

Methods

impl<E> Timeout<E>[src]

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

Trait Implementations

impl<E> Clone for Timeout<E>[src]

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

impl<S, E> Transform<S> for Timeout<E> where
    S: Service
[src]

type Request = S::Request

Requests handled by the service.

type Response = S::Response

Responses given by the service.

type Error = TimeoutError<S::Error>

Errors produced by the service.

type InitError = E

Errors produced while building a transform service.

type Transform = TimeoutService<S>

The TransformService value created by this factory

type Future = Ready<Result<Self::Transform, Self::InitError>>

The future response value.

Auto Trait Implementations

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

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

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

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

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

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,