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

Is there a derive for my_enum.is_my_enum_variant()? #81

Closed
nerdrew opened this issue Jan 20, 2020 · 2 comments
Closed

Is there a derive for my_enum.is_my_enum_variant()? #81

nerdrew opened this issue Jan 20, 2020 · 2 comments

Comments

@nerdrew
Copy link

nerdrew commented Jan 20, 2020

I'd like to be able to derive functions for each variant: is_variant1(), etc. Much like is_some(), is_none(), is_ok(), etc.

Is that supported? Feature request-able?

@Peternator7
Copy link
Owner

That is not currently implemented, but it would definitely be doable! You are welcome to tackle it if you'd like :) . Otherwise I'll see if I can get to it when I have time.

@Peternator7
Copy link
Owner

This was actually added in #257

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

No branches or pull requests

2 participants