Provides the procedural macro FromToRepr
which can be applied to a enum with an explicit representation (e.g #[repr(u8)]
) and derives TryFrom
from the representation type to the enum and From
from the enum to the representation type.
As an example,
```rust
enum ColorChannel { RED = 0, GREEN = 1, BLUE = 2, } ```
becomes
```rust
enum ColorChannel {
RED = 0,
GREEN = 1,
BLUE = 2,
}
impl ::std::convert::TryFrom