Struct ntex_util::services::timeout::TimeoutService
source · pub struct TimeoutService<S> { /* private fields */ }Expand description
Applies a timeout to requests.
Implementations§
source§impl<S> TimeoutService<S>
impl<S> TimeoutService<S>
Trait Implementations§
source§impl<S: Clone> Clone for TimeoutService<S>
impl<S: Clone> Clone for TimeoutService<S>
source§fn clone(&self) -> TimeoutService<S>
fn clone(&self) -> TimeoutService<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<S: Debug> Debug for TimeoutService<S>
impl<S: Debug> Debug for TimeoutService<S>
source§impl<S, R> Service<R> for TimeoutService<S>where
S: Service<R>,
impl<S, R> Service<R> for TimeoutService<S>where S: Service<R>,
§type Error = TimeoutError<<S as Service<R>>::Error>
type Error = TimeoutError<<S as Service<R>>::Error>
Errors produced by the service when polling readiness or executing call.
§type Future<'f>
where
Self: 'f,
R: 'f = Either<TimeoutServiceResponse<'f, S, R>, TimeoutServiceResponse2<'f, S, R>>
type Future<'f> where Self: 'f, R: 'f = Either<TimeoutServiceResponse<'f, S, R>, TimeoutServiceResponse2<'f, S, R>>
The future response value.
source§fn call<'a>(&'a self, request: R, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, request: R, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where
Self: Sized,
F: Fn(Self::Response) -> Res,
fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where Self: Sized, F: Fn(Self::Response) -> Res,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where Self: Sized, F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service. Read more
source§fn chain(self) -> ServiceChain<Self, Req>where
Self: Sized,
fn chain(self) -> ServiceChain<Self, Req>where Self: Sized,
Convert
Self to a ServiceChainAuto Trait Implementations§
impl<S> RefUnwindSafe for TimeoutService<S>where S: RefUnwindSafe,
impl<S> Send for TimeoutService<S>where S: Send,
impl<S> Sync for TimeoutService<S>where S: Sync,
impl<S> Unpin for TimeoutService<S>where S: Unpin,
impl<S> UnwindSafe for TimeoutService<S>where S: 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
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Servicesource§fn into_chain(self) -> ServiceChain<Svc, Req>where
Self: Sized,
fn into_chain(self) -> ServiceChain<Svc, Req>where Self: Sized,
Convert
Self to a ServiceChain