Struct actix_service::dev::FnServiceFactory [−][src]
pub struct FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
F: FnMut(Req) -> Fut,
Fut: Future<Output = Result<Res, Err>>, { /* fields omitted */ }
Trait Implementations
impl<F, Fut, Req, Res, Err, Cfg> IntoServiceFactory<FnServiceFactory<F, Fut, Req, Res, Err, Cfg>> for F where
F: Fn(Req) -> Fut + Clone,
Fut: Future<Output = Result<Res, Err>>,
impl<F, Fut, Req, Res, Err, Cfg> IntoServiceFactory<FnServiceFactory<F, Fut, Req, Res, Err, Cfg>> for F where
F: Fn(Req) -> Fut + Clone,
Fut: Future<Output = Result<Res, Err>>,
Convert Self
to a ServiceFactory
type Request = Req
type Request = Req
Requests handled by the service.
type Response = Res
type Response = Res
Responses given by the service.
type Error = Err
type Error = Err
Errors produced by the service.
type Future = Fut
type Future = Fut
The future response value.
Returns Ready
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
Map this service’s output to a different type, returning a new service of the resulting type. Read more
impl<F, Fut, Req, Res, Err, Cfg> ServiceFactory for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
F: FnMut(Req) -> Fut + Clone,
Fut: Future<Output = Result<Res, Err>>,
impl<F, Fut, Req, Res, Err, Cfg> ServiceFactory for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
F: FnMut(Req) -> Fut + Clone,
Fut: Future<Output = Result<Res, Err>>,
type Request = Req
type Request = Req
Requests handled by the created services.
type Response = Res
type Response = Res
Responses given by the created services.
type Error = Err
type Error = Err
Errors produced by the created services.
type Config = Cfg
type Config = Cfg
Service factory configuration.
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, Req, Res, Err, Cfg> RefUnwindSafe for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
Cfg: RefUnwindSafe,
F: RefUnwindSafe,
Req: RefUnwindSafe,
impl<F, Fut, Req, Res, Err, Cfg> Send for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
Cfg: Send,
F: Send,
Req: Send,
impl<F, Fut, Req, Res, Err, Cfg> Sync for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
Cfg: Sync,
F: Sync,
Req: Sync,
impl<F, Fut, Req, Res, Err, Cfg> Unpin for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
Cfg: Unpin,
F: Unpin,
Req: Unpin,
impl<F, Fut, Req, Res, Err, Cfg> UnwindSafe for FnServiceFactory<F, Fut, Req, Res, Err, Cfg> where
Cfg: UnwindSafe,
F: UnwindSafe,
Req: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert to a Service
Convert Self
to a ServiceFactory