pub fn proxy_client<ResBody, ResponseError, ServiceError, ResponseFuture, ServiceFuture, S, N>(
new_service: N,
) -> Client<Connector<N>>where
ResBody: Payload,
ResponseError: Error + Send + Sync + 'static,
ServiceError: Error + Send + Sync + 'static,
ResponseFuture: Future<Item = Response<S::ResBody>, Error = ResponseError> + Send + 'static,
ServiceFuture: Future<Item = S, Error = ServiceError> + Send + 'static,
S: Service<ReqBody = Body, ResBody = ResBody, Error = ResponseError, Future = ResponseFuture> + Send + 'static,
N: NewService<ReqBody = S::ReqBody, ResBody = S::ResBody, Future = ServiceFuture, Error = ResponseError, Service = S, InitError = ServiceError> + Sync + Send,
Expand description
Creates a hyper client whose requests are converted to responses by being
passed through a hyper Service
instantiated by and returned from the given
NewService
.
proxy_client_fn
is much more simple and almost as powerful, so should
generally be preferred.