tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.86k stars 500 forks source link

Setting custom name for Rust enum resulted from a `oneof` field #1059

Closed yuxuan-xie closed 1 month ago

yuxuan-xie commented 4 months ago

A workaround for #505.

yuxuan-xie commented 1 month ago

Thanks for the review. I fully understand your concern. Adapting some transparent strategy that does not support explicit renaming is much more advantageous in terms of maintenance and consistency across the whole codebase. But it seems that the usecase in #505, which is also my usecase, is a bit too much a corner case so developers are not willing to pay too many efforts to this. So for now, I will just use this roughly patched fork in my own project and close this pull request. If someone is willing to fix this problem with a more compatible solution, I am very glad to help.