Skip to content
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

feat: Expose status constructors #579

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Mar 16, 2021

Motivation

I have a tower::Service that generates time-series metrics for gRPC RPCs. That code currently has reimplementations of Status::from_header_map and Code::from_bytes to extract the gRPC status from a hyper::http::Response. I would rather not reimplement those functions.

Solution

Export Status::from_header_map and Code::from_bytes from the crate.

@tdyas tdyas force-pushed the make_some_code_methods_public branch from dcb69f7 to 20ab587 Compare March 16, 2021 05:06
Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable. Thanks!

@LucioFranco LucioFranco changed the title make certain status/code constructors public feat: Expose status constructors Apr 7, 2021
@LucioFranco LucioFranco merged commit 0d05aa0 into hyperium:master Apr 7, 2021
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