sectioned_manual/sectioned_manual.rs
1use config_tools::Config;
2
3fn main() {
4 let config = Config::builder()
5 .section("Server")
6 .set("host", "127.0.0.1")
7 .set("port", "8080")
8 .section("Window")
9 .set("width", "720")
10 .set("height", "480")
11 .general()
12 .set("console", "true")
13 .build();
14
15 config
16 .save("sectioned-manual.ini")
17 .expect("Failed to save config.");
18
19 println!("{:#?}", config);
20}