hyper
hyper copied to clipboard
feat(client/dispatch): `try_poll_ready()` methods
this change is motivated by aiming to use interfaces like hyper::client::conn::http2::SendRequest::try_send_request() or hyper::client::conn::http1::SendRequest::try_send_request() in the context of tower middleware; the Service<T> trait's signature is such that the same error type be returned from Service::poll_ready() and Service::call().
this means that services that might resolve to a recovered message may call try_poll_ready when polling for readiness.
this avoids making TrySendError<T> constructable externally, see #3883 as an alternate approach that was considered.