back_to_enum

Macro back_to_enum 

Source
macro_rules! back_to_enum {
    ($(#[$meta:meta])* $vis:vis enum $name:ident {
        $($(#[$vmeta:meta])* $vname:ident $(= $val:expr)?,)*
    }) => { ... };
}
Expand description

A macro that automatically implements the TryFrom trait if the macro has key-value pairs

https://stackoverflow.com/a/57578431/10521417