strum icon indicating copy to clipboard operation
strum copied to clipboard

Is there a derive for `my_enum.is_my_enum_variant()`?

Open nerdrew opened this issue 5 years ago • 1 comments

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?

nerdrew avatar Jan 20 '20 01:01 nerdrew

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 avatar Feb 03 '20 18:02 Peternator7