Skip to content

feat(client): add a TrySendError::error() method #3885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cratelyn
Copy link
Member

@cratelyn cratelyn commented May 6, 2025

this commit introduces a new inherent method to
hyper::client::conn::TrySendError<T>.

this error type includes a TrySendError::into_error() method today that will consume the TrySendError<T>, returning the inner error. this commit introduces a new method that allows callers to inspect the error, e.g. to update metrics, without needing to consume the error.

this is akin to #3884, which added the TrySendError::message() method that returns a reference to the T-typed message when applicable.

this commit introduces a new inherent method to
`hyper::client::conn::TrySendError<T>`.

this error type includes a `TrySendError::into_error()` method today
that will consume the `TrySendError<T>`, returning the inner error. this
commit introduces a new method that allows callers to inspect the error,
e.g. to update metrics, without needing to consume the error.

this is akin to hyperium#3884, which added the `TrySendError::message()` method
that returns a reference to the `T`-typed message when applicable.

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn marked this pull request as ready for review May 6, 2025 02:58
@cratelyn cratelyn merged commit efa0b26 into hyperium:master May 6, 2025
22 checks passed
@cratelyn cratelyn self-assigned this May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants