Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 844 Bytes

README.MD

File metadata and controls

32 lines (25 loc) · 844 Bytes

Latest Version License Build state

example

main.rs

#[macro_use]
extern crate enum_to_str_derive;

#[derive(EnumToStr)]
enum Foo {
    Foo,
    #[ETS(value = r#"Can you please tell me what does "foo" mean"#)]
    Question,
}

fn main() {
    debug_assert_eq!("Foo", Foo::Foo.enum_to_str());
    debug_assert_eq!(
        r#"Can you please tell me what does "foo" mean"#,
        Foo::Question.enum_to_str()
    );
}

TODO

  • add attribute: value
  • add attribute: handler