Struct actix_service::dev::FnServiceConfig [−][src]
pub struct FnServiceConfig<F, Fut, Cfg, Srv, Err> where
F: Fn(Cfg) -> Fut,
Fut: Future<Output = Result<Srv, Err>>,
Srv: Service, { /* fields omitted */ }
Expand description
Convert Fn(&Config) -> Future<Service>
fn to NewService
Trait Implementations
impl<F, Fut, Cfg, Srv, Err> ServiceFactory for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
F: Fn(Cfg) -> Fut,
Fut: Future<Output = Result<Srv, Err>>,
Srv: Service,
impl<F, Fut, Cfg, Srv, Err> ServiceFactory for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
F: Fn(Cfg) -> Fut,
Fut: Future<Output = Result<Srv, Err>>,
Srv: Service,
type Config = Cfg
type Config = Cfg
Service factory configuration.
type Service = Srv
type Service = Srv
The kind of Service
created by this factory.
type InitError = Err
type InitError = Err
Errors potentially raised while building a service.
type Future = Fut
type Future = Fut
The future of the Service
instance.
Create and return a new service asynchronously.
Map this service’s output to a different type, returning a new service of the resulting type. Read more
Map this service’s error to a different error, returning a new service.
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations
impl<F, Fut, Cfg, Srv, Err> RefUnwindSafe for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
Cfg: RefUnwindSafe,
Err: RefUnwindSafe,
F: RefUnwindSafe,
Fut: RefUnwindSafe,
Srv: RefUnwindSafe,
impl<F, Fut, Cfg, Srv, Err> Send for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
Cfg: Send,
Err: Send,
F: Send,
Fut: Send,
Srv: Send,
impl<F, Fut, Cfg, Srv, Err> Sync for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
Cfg: Sync,
Err: Sync,
F: Sync,
Fut: Sync,
Srv: Sync,
impl<F, Fut, Cfg, Srv, Err> Unpin for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
Cfg: Unpin,
Err: Unpin,
F: Unpin,
Fut: Unpin,
Srv: Unpin,
impl<F, Fut, Cfg, Srv, Err> UnwindSafe for FnServiceConfig<F, Fut, Cfg, Srv, Err> where
Cfg: UnwindSafe,
Err: UnwindSafe,
F: UnwindSafe,
Fut: UnwindSafe,
Srv: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Self
to a ServiceFactory