pub trait MakeService<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(&self, ctx: Ctx) -> Self::Future;
}
Expand description

A trait representing a factory of Services.

The signature of this trait imitates tower_util::MakeService, but there are the following differences:

  • This trait does not have the method poll_ready to check if the factory is ready for creating a Service.
  • The method make_service is immutable.

Required Associated Types§

The response type returned by Service.

The error type returned by Service.

The type of services created by this factory.

The type of errors that occur while creating Service.

The type of Future returned from make_service.

Required Methods§

Creates a Future that will return a value of Service.

Implementors§