enum_convert 0.2.0

A Rust procedural macro library for deriving automatic conversions between enum variants
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use enum_convert::EnumInto;

#[derive(EnumInto)] // Should only work on enums
#[enum_into(Target)]
struct Source {
    field: i32,
}

enum Target {
    Unit,
}

fn main() {}