hyper
hyper copied to clipboard
feat(client/dispatch): `TrySendError<T>: std::error::Error`
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