optional_struct 0.5.2

Crate defining a macro that will generate, from a structure, another structure with only Option<T> fields
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use optional_struct::*;

#[optional_struct]
struct Config(Option<u32>, String, f32);

#[test]
fn test_apply_options_tuple_struct() {
    let opt_config = OptionalConfig::default();
    assert_eq!(opt_config.0, None);
    assert_eq!(opt_config.1, None);
    assert_eq!(opt_config.2, None);
}