Struct ntex::service::boxed::BoxServiceFactory [−][src]
pub struct BoxServiceFactory<C, Req, Res, Err, InitErr>(_);
Trait Implementations
impl<C, Req, Res, Err, InitErr> ServiceFactory for BoxServiceFactory<C, Req, Res, Err, InitErr> where
Err: 'static,
Res: 'static,
Req: 'static,
InitErr: 'static,
[src]
impl<C, Req, Res, Err, InitErr> ServiceFactory for BoxServiceFactory<C, Req, Res, Err, InitErr> where
Err: 'static,
Res: 'static,
Req: 'static,
InitErr: 'static,
[src]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 InitError = InitErr
type InitError = InitErr
Errors produced while building a service.
type Config = C
type Config = C
Service factory configuration
type Service = Box<dyn Service<Response = Res, Request = Req, Future = Pin<Box<dyn Future<Output = Result<Res, Err>> + 'static, Global>>, Error = Err> + 'static, Global>
type Service = Box<dyn Service<Response = Res, Request = Req, Future = Pin<Box<dyn Future<Output = Result<Res, Err>> + 'static, Global>>, Error = Err> + 'static, Global>
The Service
value created by this factory
type Future = Pin<Box<dyn Future<Output = Result<<BoxServiceFactory<C, Req, Res, Err, InitErr> as ServiceFactory>::Service, InitErr>> + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<BoxServiceFactory<C, Req, Res, Err, InitErr> as ServiceFactory>::Service, InitErr>> + 'static, Global>>
The future of the ServiceFactory
instance.
pub fn new_service(
&self,
cfg: C
) -> <BoxServiceFactory<C, Req, Res, Err, InitErr> as ServiceFactory>::Future
[src]
pub fn new_service(
&self,
cfg: C
) -> <BoxServiceFactory<C, Req, Res, Err, InitErr> as ServiceFactory>::Future
[src]Create and return a new service value asynchronously.
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
F: FnMut(Self::Response) -> R + Clone,
[src]
fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
F: FnMut(Self::Response) -> R + Clone,
[src]Map this service’s output to a different type, returning a new service of the resulting type. Read more
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E> where
F: Fn(Self::Error) -> E + Clone,
[src]
fn map_err<F, E>(self, f: F) -> MapErrServiceFactory<Self, F, E> where
F: Fn(Self::Error) -> E + Clone,
[src]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
F: Fn(Self::InitError) -> E + Clone,
[src]
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
F: Fn(Self::InitError) -> E + Clone,
[src]Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations
impl<C, Req, Res, Err, InitErr> !RefUnwindSafe for BoxServiceFactory<C, Req, Res, Err, InitErr>
impl<C, Req, Res, Err, InitErr> !Send for BoxServiceFactory<C, Req, Res, Err, InitErr>
impl<C, Req, Res, Err, InitErr> !Sync for BoxServiceFactory<C, Req, Res, Err, InitErr>
impl<C, Req, Res, Err, InitErr> Unpin for BoxServiceFactory<C, Req, Res, Err, InitErr>
impl<C, Req, Res, Err, InitErr> !UnwindSafe for BoxServiceFactory<C, Req, Res, Err, InitErr>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> IntoServiceFactory<T> for T where
T: ServiceFactory,
[src]
impl<T> IntoServiceFactory<T> for T where
T: ServiceFactory,
[src]pub fn into_factory(self) -> T
[src]
pub fn into_factory(self) -> T
[src]Convert Self
to a ServiceFactory
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self