enum-to-string-traits 0.1.0

Provides the `EnumToString` derive macro which implements the methods `as_str()` and `as_dbg()` to enums with no associated values
Documentation
1
2
3
4
5
6
7
8
9
pub trait EnumToString {
    fn as_str(&self) -> &'static str;
    fn as_dbg(&self) -> &'static str;
}

pub trait SerdeEnumToString {
    fn as_str(&self) -> &'static str;
    fn as_dbg(&self) -> &'static str;
}