Trait HttpMiddleware

Source
pub trait HttpMiddleware<S> {
    type Service;

    // Required method
    fn apply(self, inner: S) -> Self::Service;
}

Required Associated Types§

Required Methods§

Source

fn apply(self, inner: S) -> Self::Service

Implementations on Foreign Types§

Source§

impl<S> HttpMiddleware<S> for ()

The unit type can be used as a no-op middleware, mapping S to itself.

Source§

type Service = S

Source§

fn apply(self, service: S) -> <() as HttpMiddleware<S>>::Service

Source§

impl<S> HttpMiddleware<S> for SetStatus

Source§

impl<S, F> HttpMiddleware<S> for MapRequest<F>

Source§

type Service = MapRequestService<S, F>

Source§

fn apply(self, inner: S) -> <MapRequest<F> as HttpMiddleware<S>>::Service

Source§

impl<S, F> HttpMiddleware<S> for MapResponse<F>

Source§

impl<S, M1> HttpMiddleware<S> for (M1,)
where M1: HttpMiddleware<S>,

Source§

type Service = <M1 as HttpMiddleware<S>>::Service

Source§

fn apply(self, service: S) -> <(M1,) as HttpMiddleware<S>>::Service

Source§

impl<S, M1, M2> HttpMiddleware<S> for (M1, M2)
where M1: HttpMiddleware<<M2 as HttpMiddleware<S>>::Service>, M2: HttpMiddleware<S>,

Source§

type Service = <M1 as HttpMiddleware<<M2 as HttpMiddleware<S>>::Service>>::Service

Source§

fn apply(self, service: S) -> <(M1, M2) as HttpMiddleware<S>>::Service

Source§

impl<S, M1, M2, M3> HttpMiddleware<S> for (M1, M2, M3)

Source§

impl<S, M1, M2, M3, M4> HttpMiddleware<S> for (M1, M2, M3, M4)

Source§

impl<S, M1, M2, M3, M4, M5> HttpMiddleware<S> for (M1, M2, M3, M4, M5)

Source§

impl<S, M1, M2, M3, M4, M5, M6> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6)

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7)

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7, M8> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7, M8)

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7, M8, M9> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7, M8, M9)

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7, M8, M9, M10> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7, M8, M9, M10)
where M1: HttpMiddleware<<M2 as HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M2: HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M3: HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M4: HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M5: HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>, M6: HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>, M7: HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>>::Service>, M8: HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>>::Service>, M9: HttpMiddleware<<M10 as HttpMiddleware<S>>::Service>, M10: HttpMiddleware<S>,

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11)
where M1: HttpMiddleware<<M2 as HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M2: HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M3: HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M4: HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M5: HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M6: HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>, M7: HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>, M8: HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>>::Service>, M9: HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>>::Service>, M10: HttpMiddleware<<M11 as HttpMiddleware<S>>::Service>, M11: HttpMiddleware<S>,

Source§

impl<S, M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12> HttpMiddleware<S> for (M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12)
where M1: HttpMiddleware<<M2 as HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M2: HttpMiddleware<<M3 as HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M3: HttpMiddleware<<M4 as HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M4: HttpMiddleware<<M5 as HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M5: HttpMiddleware<<M6 as HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M6: HttpMiddleware<<M7 as HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>>::Service>, M7: HttpMiddleware<<M8 as HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>>::Service>, M8: HttpMiddleware<<M9 as HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>>::Service>, M9: HttpMiddleware<<M10 as HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>>::Service>, M10: HttpMiddleware<<M11 as HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>>::Service>, M11: HttpMiddleware<<M12 as HttpMiddleware<S>>::Service>, M12: HttpMiddleware<S>,

Source§

impl<S, M> HttpMiddleware<S> for Option<M>
where M: HttpMiddleware<S>,

Source§

type Service = Either<<M as HttpMiddleware<S>>::Service, S>

Source§

fn apply(self, inner: S) -> <Option<M> as HttpMiddleware<S>>::Service

Implementors§

Source§

impl<S> HttpMiddleware<S> for zon::middleware::SetStatus

Source§

impl<S, F> HttpMiddleware<S> for zon::middleware::MapRequest<F>

Source§

impl<S, F> HttpMiddleware<S> for zon::middleware::MapResponse<F>

Source§

impl<S, T> HttpMiddleware<S> for SetTaskLocal<T>
where T: Clone + Send + Sync + 'static,