Rename Enum Variants #2455
Answered
by
davidhewitt
yodaldevoid
asked this question in
Questions
-
Is there currently any way to expose a different name for an enum variant to python from the one used in Rust? I like to use names that fit the standard Python formatting from my Python API, but this means that I either need to have enum variants that don't match the Rust formatting throughout my Rust code, or I need to duplicate each enum to have Rust version and a Python version. |
Beta Was this translation helpful? Give feedback.
Answered by
davidhewitt
Jun 15, 2022
Replies: 1 comment 1 reply
-
I would accept a PR to add |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
yodaldevoid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would accept a PR to add
#[pyo3(name = "...")]
support for enum variants!