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

Also support ToPrimitive #4

Open
daschl opened this issue Nov 17, 2015 · 2 comments
Open

Also support ToPrimitive #4

daschl opened this issue Nov 17, 2015 · 2 comments

Comments

@daschl
Copy link

daschl commented Nov 17, 2015

Hi!

I think adding ToPrimitive implementations would be a great benefit. Very often I need to convert to and from an enum with primitives. Do you think you can also add this implementation? Otherwise right now I can use your macro but then need to go implement ToPrimitive on my own :)

I'm new to rust and macro programming, so I don't know if I can pull it off easily. Let me know what you think!

@chrivers
Copy link

I have the same problem - I'm also not sure what to do. I think this should definitely be supported. I'll see if I can figure out a PR.

@cardoe
Copy link

cardoe commented Aug 30, 2017

fwiw, https://crates.io/crates/enum-primitive-derive supports ToPrimitive.

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

No branches or pull requests

3 participants