sectioned_macro/
sectioned_macro.rs

1fn main() {
2    let config = config_tools::sectioned_defaults! {
3        { "console" => "true" }
4
5        ["Application"] {
6            "host" => "127.0.0.1",
7            "port" => "8080",
8        }
9
10        ["Window"] {
11            "width" => "720",
12            "height" => "480",
13        }
14    };
15
16    config
17        .save("sectioned-macro.ini")
18        .expect("Failed to save config.");
19
20    println!("{:#?}", config);
21}