constructor-lite 0.3.0

Generate minimal constructors for structs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use constructor_lite::ConstructorLite;

#[derive(Debug, PartialEq, ConstructorLite)]
struct Movie {
    title: String,
    year: Option<u16>,
}

#[test]
fn test_simple() {
    assert_eq!(
        Movie::new("Star Wars".to_owned()),
        Movie {
            title: "Star Wars".to_owned(),
            year: None
        }
    )
}