Struct ntex_service::dev::Apply
source · pub struct Apply<T, Req, F, R, In, Out, Err>where
T: Service<Req>,{ /* private fields */ }Expand description
Apply service combinator
Trait Implementations§
source§impl<T, Req, F, R, In, Out, Err> Clone for Apply<T, Req, F, R, In, Out, Err>where
T: Service<Req> + Clone,
F: Fn(In, Pipeline<T>) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
Err: From<T::Error>,
impl<T, Req, F, R, In, Out, Err> Clone for Apply<T, Req, F, R, In, Out, Err>where T: Service<Req> + Clone, F: Fn(In, Pipeline<T>) -> R + Clone, R: Future<Output = Result<Out, Err>>, Err: From<T::Error>,
source§impl<T, Req, F, R, In, Out, Err> Debug for Apply<T, Req, F, R, In, Out, Err>where
T: Service<Req> + Debug,
impl<T, Req, F, R, In, Out, Err> Debug for Apply<T, Req, F, R, In, Out, Err>where T: Service<Req> + Debug,
source§impl<T, Req, F, R, In, Out, Err> Service<In> for Apply<T, Req, F, R, In, Out, Err>where
T: Service<Req>,
F: Fn(In, Pipeline<T>) -> R,
R: Future<Output = Result<Out, Err>>,
Err: From<T::Error>,
impl<T, Req, F, R, In, Out, Err> Service<In> for Apply<T, Req, F, R, In, Out, Err>where T: Service<Req>, F: Fn(In, Pipeline<T>) -> R, R: Future<Output = Result<Out, Err>>, Err: From<T::Error>,
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 call<'a>(&'a self, req: In, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, req: In, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§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<T, Req, F, R, In, Out, Err> !RefUnwindSafe for Apply<T, Req, F, R, In, Out, Err>
impl<T, Req, F, R, In, Out, Err> !Send for Apply<T, Req, F, R, In, Out, Err>
impl<T, Req, F, R, In, Out, Err> !Sync for Apply<T, Req, F, R, In, Out, Err>
impl<T, Req, F, R, In, Out, Err> Unpin for Apply<T, Req, F, R, In, Out, Err>where F: Unpin,
impl<T, Req, F, R, In, Out, Err> !UnwindSafe for Apply<T, Req, F, R, In, Out, Err>
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