Acts as a service factory. This is useful for cases where new
values must be produced. One case is a TCP server listener. The listener
accepts new TCP streams, obtains a new
Service value using the
MakeService trait, and uses that new
Service value to process inbound
requests on that new TCP stream.
This is essentially a trait alias for a
Responses given by the service
Errors produced by the service
Service value created by this factory
Errors produced while building a service.
The future of the
Ready when the factory is able to create more services.
If the service is at capacity, then
NotReady is returned and the task
is notified when the service becomes ready again. This function is
expected to be called while on a task.
This is a best effort implementation. False positives are permitted.
It is permitted for the service to return
Ready from a
call and for the next invocation of
call to result in an error.
fn make_service(&mut self, target: Target) -> Self::Future
Create and return a new service value asynchronously.