proxy-enum icon indicating copy to clipboard operation
proxy-enum copied to clipboard

Allow implementing From and TryInto

Open charles-r-earp opened this issue 5 years ago • 1 comments

I might even submit a PR for this. It's a common pattern when using enums to implement MyEnum From<Variant> for each variant, and likewise it would even be nice to have the reverse, TryInto<Variant> for MyEnum. Notably the enumerate crate does implement From, but it isn't as flexible, it can't be combined with attributes like derive.

charles-r-earp avatar Nov 24 '20 00:11 charles-r-earp

Totally agree, From & TryInto implementations would be awesome. I'd appreciate a PR!

NyxCode avatar Nov 24 '20 01:11 NyxCode