derive_builder 0.2.1

Rust macro based on custom_derive to automatically implement the builder pattern for arbitrary structs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[macro_use] extern crate custom_derive;
#[macro_use] extern crate derive_builder;

custom_derive!{
    /// This is a doc comment for the struct
    #[warn(missing_docs)]
    #[allow(non_snake_case)]
    #[derive(Debug, PartialEq, Default, Builder)]
    struct IgnoreEmptyStruct {  }
}

#[test]
fn empty_struct() {
    // this is just a compile-test - no run time checks required.
}