Struct ntex_service::dev::Apply
source · [−]pub struct Apply<T, Req, F, R, In, Out, Err> where
T: Service<Req, Error = Err>, { /* private fields */ }Expand description
Apply service combinator
Trait Implementations
sourceimpl<T, Req, F, R, In, Out, Err> Clone for Apply<T, Req, F, R, In, Out, Err> where
T: Service<Req, Error = Err> + Clone,
F: Fn(In, &T) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
impl<T, Req, F, R, In, Out, Err> Clone for Apply<T, Req, F, R, In, Out, Err> where
T: Service<Req, Error = Err> + Clone,
F: Fn(In, &T) -> R + Clone,
R: Future<Output = Result<Out, Err>>,
sourceimpl<T, Req, F, R, In, Out, Err> Service<In> for Apply<T, Req, F, R, In, Out, Err> where
T: Service<Req, Error = Err>,
F: Fn(In, &T) -> R,
R: Future<Output = Result<Out, Err>>,
impl<T, Req, F, R, In, Out, Err> Service<In> for Apply<T, Req, F, R, In, Out, Err> where
T: Service<Req, Error = Err>,
F: Fn(In, &T) -> R,
R: Future<Output = Result<Out, Err>>,
type Response = Out
type Response = Out
Responses given by the service.
type Error = Err
type Error = Err
Errors produced by the service.
type Future = R
type Future = R
The future response value.
sourcefn 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 more
sourcefn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
fn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
Shutdown service. Read more
sourcefn call(&self, req: In) -> Self::Future
fn call(&self, req: In) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations
impl<T, Req, F, R, In, Out, Err> RefUnwindSafe for Apply<T, Req, F, R, In, Out, Err> where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Req, F, R, In, Out, Err> Send for Apply<T, Req, F, R, In, Out, Err> where
F: Send,
T: Send,
impl<T, Req, F, R, In, Out, Err> Sync for Apply<T, Req, F, R, In, Out, Err> where
F: Sync,
T: Sync,
impl<T, Req, F, R, In, Out, Err> Unpin for Apply<T, Req, F, R, In, Out, Err> where
F: Unpin,
T: Unpin,
impl<T, Req, F, R, In, Out, Err> UnwindSafe for Apply<T, Req, F, R, In, Out, Err> where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
impl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
sourcefn into_service(self) -> T
fn into_service(self) -> T
Convert to a Service