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

Expose from_str_name() for generated enums #774

Merged
merged 4 commits into from Dec 12, 2022

Conversation

segfault87
Copy link
Contributor

Hi.

This PR enables prost-build codegen to include from_str_name() for each generated enumerations.

Currently there is no way to create Protobuf enums from names. Since Protobuf JSON format states enum value can be represented as string value, I think it is necessary when it comes to adding support for JSON serialization/deserialization.

@segfault87 segfault87 force-pushed the create-enum-from-str-name branch 3 times, most recently from bf13275 to 2336379 Compare December 11, 2022 13:05
@LucioFranco LucioFranco merged commit c2c4f0f into tokio-rs:master Dec 12, 2022
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.

None yet

2 participants