pub struct Timeout<St> { /* 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, St> Middleware<S, St> for Timeout<St>
impl<S, St> Middleware<S, St> for Timeout<St>
Source§type Service = TimeoutService<S, St>
type Service = TimeoutService<S, St>
The middleware
Service value created by this factorySource§fn create(&self, _: &St, service: S) -> Self::Service
fn create(&self, _: &St, service: S) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply_to<Sf, Req>(
self,
factory: Sf,
) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
fn apply_to<Sf, Req>( self, factory: Sf, ) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl<St> Freeze for Timeout<St>where
PhantomData<St>: Freeze,
impl<St> RefUnwindSafe for Timeout<St>where
PhantomData<St>: RefUnwindSafe,
impl<St> Send for Timeout<St>where
PhantomData<St>: Send,
impl<St> Sync for Timeout<St>where
PhantomData<St>: Sync,
impl<St> Unpin for Timeout<St>where
PhantomData<St>: Unpin,
impl<St> UnsafeUnpin for Timeout<St>where
PhantomData<St>: UnsafeUnpin,
impl<St> UnwindSafe for Timeout<St>where
PhantomData<St>: 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