enum-tools 0.5.5

Automatically derive functions and trait implementations for enums
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
include!("macro/macro.rs");

setup_g!(#[enum_tools(iter(mode = "range"), range)];);

#[test]
fn range_range() {
    use eg::EG;
    assert_eq!(
        EG::range(EG::A, EG::D).collect::<Vec<_>>(),
        vec![EG::A, EG::B, EG::C, EG::D]
    );
    let _ = EG::iter(); // to silence dead-code warning
}