Crate system_config[−][src]
Expand description
system-config
A Rust library for storing application properties on disk in any context and between restarts.
Example
Add key-value pairs to the config and write it to disk…
let mut config = Config::new("system-config-example").unwrap();
config.insert("key1", "value1");
config.insert("key2", "value2");
config.write().unwrap();
Then retrieve the information at any other time, even after the application is restarted or in different contexts.
let config = Config::new("system-config-example").unwrap();
let key1 = config.get("key1").unwrap();
let key2 = config.get("key2").unwrap();
println!("key1: {}", key1);
println!("key2: {}", key2);