natural-derive 0.4.0

Proc macros for naturally deriving basic trait impls for new types.
Documentation
1
2
3
4
5
6
7
8
9
use natural_derive::Add;

#[derive(Debug, PartialEq, Eq, Add)]
struct Kelvin(u32);

fn main() {
    let kelvin = Kelvin(42) + Kelvin(1);
    assert_eq!(kelvin, Kelvin(43));
}