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

AsVariant for enum #358

Open
TylerBloom opened this issue May 17, 2024 · 1 comment · May be fixed by #415
Open

AsVariant for enum #358

TylerBloom opened this issue May 17, 2024 · 1 comment · May be fixed by #415

Comments

@TylerBloom
Copy link

It would be nice to have a derive macro that is similar to IsVariant and Unwrap but that turns an enum into an Option<T> (where T is the data of that variant).

@JelteF
Copy link
Owner

JelteF commented Sep 8, 2024

Makes a lot of sense. Feel free to contribute a PR.

@crazymerlyn crazymerlyn linked a pull request Sep 27, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants