logo

Function actix_service::apply_cfg[][src]

pub fn apply_cfg<S1, Req, F, Cfg, Fut, S2, Err>(
    srv: S1,
    f: F
) -> impl ServiceFactory<Req, Config = Cfg, Response = S2::Response, Error = S2::Error, Service = S2, InitError = Err, Future = Fut> + Clone where
    S1: Service<Req>,
    F: Fn(Cfg, &S1) -> Fut,
    Fut: Future<Output = Result<S2, Err>>,
    S2: Service<Req>, 
Expand description

Convert Fn(Config, &Service1) -> Future<Service2> fn to a service factory.