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

Generate FromVariant and ToVariant for enums #1355

Open
pbor opened this issue Apr 30, 2022 · 2 comments · May be fixed by #1418
Open

Generate FromVariant and ToVariant for enums #1355

pbor opened this issue Apr 30, 2022 · 2 comments · May be fixed by #1418
Labels

Comments

@pbor
Copy link
Contributor

pbor commented Apr 30, 2022

Currently introspected enums do not easily convert to variants as they just expose their u32 representation.

For instance this would be useful when storing enums in gsettings

@bilelmoussaoui
Copy link
Member

Are those traits generated by the derive macro as well?

@sdroege
Copy link
Member

sdroege commented Jul 18, 2022

The variant derive macro can do that, yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants