1 unstable release

0.1.0 Nov 17, 2024

#634 in Procedural macros

Download history 67/week @ 2024-11-11 47/week @ 2024-11-18

114 downloads per month

MIT/Apache

4KB

enum_to_vec

Version info Downloads docs dependency status

Example

use enum_to_vec::ToVec;

#[derive(ToVec)]
#[snake_case]
enum Test {
    Test,
    TestA,
    TestB,
}
#[test]
fn test_vec() {
    assert_eq!(vec!["test", "test_a", "test_b"], Test::to_vec());
}

Dependencies

~225–660KB
~15K SLoC