Function hyper_stub::proxy_client_fn[][src]

pub fn proxy_client_fn<E, Fut, F>(
    handler: F
) -> Client<impl Connect> where
    E: Error + Send + Sync + 'static,
    Fut: Future<Item = Response<Body>, Error = E> + Send + 'static,
    F: Fn(Request<Body>) -> Fut + Send + Sync + Copy + 'static, 

Creates a hyper client whose requests are converted to responses by being passed through the given handler function, which returns a future.