hyper icon indicating copy to clipboard operation
hyper copied to clipboard

feat(client/dispatch): `TrySendError<T>: std::error::Error`

Open cratelyn opened this issue 4 months ago • 0 comments

this commit introduces a std::error::Error implementation for hyper::client::conn::TrySendError.

this allows callers of hyper::client::conn::http2::SendRequest::try_send_request() or hyper::client::conn::http1::SendRequest::try_send_request() to box a TrySendError<T> without discarding a potentially recovered message.

a std::fmt::Display implementation is added in this commit, because it is a prerequisite for implementations of std::error::Error.

for some previous discussion on this topic, see "other options" here: https://github.com/hyperium/hyper/pull/3883#issuecomment-2860212062.

see also:

  • https://github.com/hyperium/hyper/pull/3883
  • https://github.com/hyperium/hyper/pull/3892

cratelyn avatar Jul 29 '25 03:07 cratelyn