ronf 0.4.2

Configuration system with saving
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ronf::{Config, File, FileFormat};

fn main() {
    let mut config = Config::builder()
        .add_file(File::new_str(
            "test_file",
            FileFormat::Json,
            "{\"key\": \"value\"}",
        ))
        .build()
        .unwrap();
    println!("\"key\": {}", config.get("key").unwrap());
    config.set("key", "another value".into());
    println!("\"key\" after change: {}", config.get("key").unwrap());
}