Skip to content

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

Merged
cratelyn merged 1 commit into
hyperium:masterfrom
cratelyn:kate/client-dispatch.try-send-error-ref
May 6, 2025
Merged

cratelyn merged 1 commit into
hyperium:masterfrom
cratelyn:kate/client-dispatch.try-send-error-ref

Conversation

@cratelyn

@cratelyn cratelyn commented May 6, 2025

Copy link
Copy Markdown
Member

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 <git@katelyn.world>
@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
@cratelyn cratelyn self-assigned this May 6, 2025
@cratelyn
cratelyn deleted the kate/client-dispatch.try-send-error-ref branch July 29, 2025 01:38
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