pub struct Timeout<E = ()> { /* private fields */ }Expand description
Applies a timeout to requests.
Timeout transform is disabled if timeout is set to 0
Implementations§
Trait Implementations§
Source§impl<S, C> Middleware<S, C> for Timeout
impl<S, C> Middleware<S, C> for Timeout
Source§type Service = TimeoutService<S>
type Service = TimeoutService<S>
The middleware
Service value created by this factorySource§fn create(&self, service: S, _: C) -> Self::Service
fn create(&self, service: S, _: C) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl<E> Freeze for Timeout<E>
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> UnsafeUnpin for Timeout<E>
impl<E> UnwindSafe for Timeout<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more