pub trait MiddlewareHandlerMapResponse<'r, T, S>: Sized {
    type Future: Future<Output = Response> + Send + 'r;

    // Required method
    fn call(
        &self,
        cx: &'r mut HttpContext,
        state: &'r S,
        response: Response
    ) -> Self::Future;
}

Required Associated Types§

source

type Future: Future<Output = Response> + Send + 'r

Required Methods§

source

fn call( &self, cx: &'r mut HttpContext, state: &'r S, response: Response ) -> Self::Future

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'r, F, Fut, Res, M, S, T1> MiddlewareHandlerMapResponse<'r, (M, T1), S> for F
where F: Fn(T1, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2> MiddlewareHandlerMapResponse<'r, (M, T1, T2), S> for F
where F: Fn(T1, T2, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3), S> for F
where F: Fn(T1, T2, T3, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4), S> for F
where F: Fn(T1, T2, T3, T4, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5), S> for F
where F: Fn(T1, T2, T3, T4, T5, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r, T12: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r, T12: FromContext<S> + Send + 'r, T13: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r, T12: FromContext<S> + Send + 'r, T13: FromContext<S> + Send + 'r, T14: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r, T12: FromContext<S> + Send + 'r, T13: FromContext<S> + Send + 'r, T14: FromContext<S> + Send + 'r, T15: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, M, S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> MiddlewareHandlerMapResponse<'r, (M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16), S> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r, T1: FromContext<S> + Send + 'r, T2: FromContext<S> + Send + 'r, T3: FromContext<S> + Send + 'r, T4: FromContext<S> + Send + 'r, T5: FromContext<S> + Send + 'r, T6: FromContext<S> + Send + 'r, T7: FromContext<S> + Send + 'r, T8: FromContext<S> + Send + 'r, T9: FromContext<S> + Send + 'r, T10: FromContext<S> + Send + 'r, T11: FromContext<S> + Send + 'r, T12: FromContext<S> + Send + 'r, T13: FromContext<S> + Send + 'r, T14: FromContext<S> + Send + 'r, T15: FromContext<S> + Send + 'r, T16: FromContext<S> + Send + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>

source§

impl<'r, F, Fut, Res, S> MiddlewareHandlerMapResponse<'r, ((),), S> for F
where F: Fn(Response) -> Fut + Copy + Send + Sync + 'static, Fut: Future<Output = Res> + Send + 'r, Res: IntoResponse + 'r, S: Send + Sync + 'r,

§

type Future = ResponseFuture<'r, Response<RespBody>>