enum-display
enum-display
is a crate for implementing std::fmt::Display
on enum variants with macros.
```rust use enumdisplayderive::EnumDisplay;
enum Color { Red, Green, Blue, }
asserteq!(Color::Red.tostring(), "Red"); asserteq!(Color::Green.tostring(), "Green"); asserteq!(Color::Blue.tostring(), "Blue"); ```
Any case from convert_case is supported.
```rust use enumdisplayderive::EnumDisplay;
enum Message { HelloGreeting { name: String }, }
asserteq!(Message::Hello { name: "Alice".tostring() }.to_string(), "hello-greeting"); ```