Struct ntex::service::dev::FnServiceNoConfig[][src]

pub struct FnServiceNoConfig<F, C, S, R, E> where
    S: Service,
    F: Fn() -> R,
    R: Future<Output = Result<S, E>>, 
{ /* fields omitted */ }
Expand description

Converter for Fn() -> Future<Service> fn

Trait Implementations

impl<F, C, S, R, E> Clone for FnServiceNoConfig<F, C, S, R, E> where
    S: Service,
    F: Fn() -> R + Clone,
    R: Future<Output = Result<S, E>>, 
[src]

pub fn clone(&self) -> FnServiceNoConfig<F, C, S, R, E>[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<F, C, S, R, E> IntoServiceFactory<FnServiceNoConfig<F, C, S, R, E>> for F where
    S: Service,
    F: Fn() -> R,
    R: Future<Output = Result<S, E>>, 
[src]

pub fn into_factory(self) -> FnServiceNoConfig<F, C, S, R, E>[src]

Convert Self to a ServiceFactory

impl<F, C, S, R, E> ServiceFactory for FnServiceNoConfig<F, C, S, R, E> where
    S: Service,
    F: Fn() -> R,
    R: Future<Output = Result<S, E>>, 
[src]

type Request = <S as Service>::Request

Requests handled by the service.

type Response = <S as Service>::Response

Responses given by the service

type Error = <S as Service>::Error

Errors produced by the service

type Service = S

The Service value created by this factory

type Config = C

Service factory configuration

type InitError = E

Errors produced while building a service.

type Future = R

The future of the ServiceFactory instance.

pub fn new_service(
    &self,
    C
) -> <FnServiceNoConfig<F, C, S, R, E> 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<F, C, S, R, E> RefUnwindSafe for FnServiceNoConfig<F, C, S, R, E> where
    C: RefUnwindSafe,
    F: RefUnwindSafe

impl<F, C, S, R, E> Send for FnServiceNoConfig<F, C, S, R, E> where
    C: Send,
    F: Send

impl<F, C, S, R, E> Sync for FnServiceNoConfig<F, C, S, R, E> where
    C: Sync,
    F: Sync

impl<F, C, S, R, E> Unpin for FnServiceNoConfig<F, C, S, R, E> where
    C: Unpin,
    F: Unpin

impl<F, C, S, R, E> UnwindSafe for FnServiceNoConfig<F, C, S, R, E> where
    C: 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> 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> 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.