1 unstable release

0.1.0 Nov 17, 2024

#629 in Procedural macros

Download history 102/week @ 2024-11-15 15/week @ 2024-11-22 2/week @ 2024-11-29 11/week @ 2024-12-06

130 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

~245–690KB
~16K SLoC