Skip to main content

apply_fn_factory

Function apply_fn_factory 

Source
pub fn apply_fn_factory<Sf, St, Req, F, In, Out, Err>(
    service: impl IntoServiceFactory<Sf, St, Req>,
    f: F,
) -> ServiceChainFactory<ApplyFactory<F, Sf, St, Req, In, Out, Err>, St, In>
where Sf: ServiceFactory<St, Req>, F: AsyncFn(In, &ApplyCtx<'_, <Sf as ServiceFactory<St, Req>>::Service, St, Req>) -> Result<Out, Err> + Clone, Err: From<<Sf as ServiceFactory<St, Req>>::Error>,
Expand description

Applies an asynchronous middleware function to every service from a factory.