nest_struct 0.5.5

Nest struct and enum definitions with minimal syntax changes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(dead_code)]
#[macro_use]
extern crate nest_struct;

#[nest_struct]
struct Config<P, 'a> {
    version: &'a str,
    // auto-generated name is overwritten to be ConfigServer
    main_server: ConfigServer! {
        name: &'a str,
        host: &'a str,
        port: P,
        user: &'a str,
        password: &'a str,
    },
    // now we reuse the auto-generated name
    backup_server: ConfigServer<'a, P>,
}