config-tools 0.5.0

A simplified set of tools for working with configuration files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tempfile::NamedTempFile;

fn main() {
    let config = config_tools::general_defaults! {
        "host" => "127.0.0.1",
        "port" => "8080",
    };

    let tmp = NamedTempFile::new().unwrap();
    config
        .save(tmp.path())
        .expect("Failed to save config.");

    println!("{:#?}", config);
}