pub trait IntoServiceFactory<T, Req, Cfg = ()>
where T: ServiceFactory<Req, Cfg>,
{ // Required method fn into_factory(self) -> T; }
Expand description

Trait for types that can be converted to a ServiceFactory

Required Methods§

source

fn into_factory(self) -> T

Convert Self to a ServiceFactory

Implementors§

source§

impl<F, Fut, Req, Res, Err, Cfg> IntoServiceFactory<FnServiceFactory<F, Fut, Req, Res, Err, Cfg>, Req, Cfg> for F
where F: Fn(Req) -> Fut + Clone, Fut: Future<Output = Result<Res, Err>>,

source§

impl<F, S, R, Req, E, C> IntoServiceFactory<FnServiceNoConfig<F, S, R, Req, E>, Req, C> for F
where F: Fn() -> R, R: Future<Output = Result<S, E>>, S: Service<Req>, C: 'static,

source§

impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for T
where T: ServiceFactory<Req, Cfg>,