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]

type Request = Req

Requests handled by the service.

type Response = Res

Responses given by the service

type Error = Err

Errors produced by the service

type InitError = InitErr

Errors produced while building a service.

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>

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>>

The future of the ServiceFactory instance.

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]

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]

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]

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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[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]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> IntoServiceFactory<T> for T where
    T: ServiceFactory
[src]

pub fn into_factory(self) -> T[src]

Convert Self to a ServiceFactory

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.