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