You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My python classes are in camelCase whilst my rust classes are in snake_case. I can manually add this for all my attributes
#[pyo3(attribute=camelCase)]
camel_case : String
But i was hoping if there is a way to do this dynamically. I was trying to write a macro to do this for me, but not getting any luck with my macro depending on FromPyObject macro. Was wondering if anybody has got any fancy ideas!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My python classes are in camelCase whilst my rust classes are in snake_case. I can manually add this for all my attributes
#[pyo3(attribute=camelCase)]
camel_case : String
But i was hoping if there is a way to do this dynamically. I was trying to write a macro to do this for me, but not getting any luck with my macro depending on FromPyObject macro. Was wondering if anybody has got any fancy ideas!
Beta Was this translation helpful? Give feedback.
All reactions