[][src]Trait izanami_service::MakeService

pub trait MakeService<Ctx, Request>: Sealed<Ctx, Request> {
    type Response;
    type Error;
    type Service: Service<Request, Response = Self::Response, Error = Self::Error>;
    type MakeError;
    type Future: Future<Item = Self::Service, Error = Self::MakeError>;
    fn make_service(&mut self, ctx: Ctx) -> Self::Future;
}

A trait representing an asynchronous factory of Services.

Associated Types

type Response

The response type returned by Service.

type Error

The error type returned by Service.

type Service: Service<Request, Response = Self::Response, Error = Self::Error>

The type of services created by this factory.

type MakeError

The type of errors that occur while creating Service.

type Future: Future<Item = Self::Service, Error = Self::MakeError>

The type of Future returned from make_service.

Loading content...

Required methods

fn make_service(&mut self, ctx: Ctx) -> Self::Future

Creates a Future that will return a value of Service.

Loading content...

Implementors

impl<S, Ctx, Request> MakeService<Ctx, Request> for S where
    S: Service<Ctx>,
    S::Response: Service<Request>, 
[src]

type Response = <S::Response as Service<Request>>::Response

type Error = <S::Response as Service<Request>>::Error

type Service = S::Response

type MakeError = S::Error

type Future = S::Future

Loading content...