[−][src]Trait hyper::service::MakeService
An asynchronous constructor of Service
s.
Associated Types
type ResBody: Payload
The Payload
body of the http::Response
.
type Error: Into<Box<dyn StdError + Send + Sync>>
The error type that can be returned by Service
s.
type Service: Service<ReqBody, ResBody = Self::ResBody, Error = Self::Error>
The resolved Service
from make_service()
.
type Future: Future<Output = Result<Self::Service, Self::MakeError>>
The future returned from new_service
of a Service
.
type MakeError: Into<Box<dyn StdError + Send + Sync>>
The error type that can be returned when creating a new Service
.
Required methods
fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::MakeError>>
Returns Ready
when the constructor is ready to create a new Service
.
The implementation of this method is allowed to return a Ready
even if
the factory is not ready to create a new service. In this case, the future
returned from make_service
will resolve to an error.
fn make_service(&mut self, target: Target) -> Self::Future
Create a new Service
.
Implementors
impl<T, Target, S, B1, B2, E, F> MakeService<Target, B1> for T where
T: for<'a> Service<&'a Target, Response = S, Error = E, Future = F>,
S: Service<Request<B1>, Response = Response<B2>>,
E: Into<Box<dyn Error + Send + Sync>>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
B1: Payload,
B2: Payload,
F: Future<Output = Result<S, E>>,
[src]
T: for<'a> Service<&'a Target, Response = S, Error = E, Future = F>,
S: Service<Request<B1>, Response = Response<B2>>,
E: Into<Box<dyn Error + Send + Sync>>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
B1: Payload,
B2: Payload,
F: Future<Output = Result<S, E>>,