Struct ntex_service::dev::MapInitErr[][src]

pub struct MapInitErr<A, F, E> { /* fields omitted */ }
Expand description

MapInitErr service combinator

Trait Implementations

impl<A, F, E> Clone for MapInitErr<A, F, E> where
    A: Clone,
    F: Clone
[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<A, F, E> ServiceFactory for MapInitErr<A, F, E> where
    A: ServiceFactory,
    F: Fn(A::InitError) -> E + Clone
[src]

type Request = A::Request

Requests handled by the service.

type Response = A::Response

Responses given by the service

type Error = A::Error

Errors produced by the service

type Config = A::Config

Service factory configuration

type Service = A::Service

The Service value created by this factory

type InitError = E

Errors produced while building a service.

type Future = MapInitErrFuture<A, F, E>

The future of the ServiceFactory instance.

fn new_service(&self, cfg: A::Config) -> Self::Future[src]

Create and return a new service value asynchronously.

fn map<F, R>(self, f: F) -> MapServiceFactory<Self, F, R> where
    Self: Sized,
    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
    Self: Sized,
    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
    Self: Sized,
    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<A, F, E> RefUnwindSafe for MapInitErr<A, F, E> where
    A: RefUnwindSafe,
    E: RefUnwindSafe,
    F: RefUnwindSafe

impl<A, F, E> Send for MapInitErr<A, F, E> where
    A: Send,
    E: Send,
    F: Send

impl<A, F, E> Sync for MapInitErr<A, F, E> where
    A: Sync,
    E: Sync,
    F: Sync

impl<A, F, E> Unpin for MapInitErr<A, F, E> where
    A: Unpin,
    E: Unpin,
    F: Unpin

impl<A, F, E> UnwindSafe for MapInitErr<A, F, E> where
    A: UnwindSafe,
    E: UnwindSafe,
    F: UnwindSafe

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, 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.