Procedural macros to derive std::convert::From and std::convert::Into implementations based on field/variant names.
The crate supports structs and enums only. unions are not supported.
From```rust struct Point2D { x: i32, y: i32, }
struct Vec2D { x: i32, y: i32, }
let point = Point2D { x: 3, y: 4 };
let vector = Vec2D::from(point); // from is derived
assert_eq!(vector, Vec2D { x: 3, y: 4 });
```
Into```rust
struct Point2D { x: i32, y: i32, }
struct Vec2D { x: i32, y: i32, }
let point = Point2D { x: 3, y: 4 }; let vector: Vec2D = point.into(); assert_eq!(vector, Vec2D { x: 3, y: 4 }); ```