A Rust Crate/Library to fetch the configurations of code from config file and return a key-value pair for all the configurations in the form of Hashmap.
Add dependency in Cargo.toml
[dependencies]
fetch_configuration = "0.2.0"
Example to use fetch configuration crate
extern crate fetch_configuration;
use fetch_configuration::configuration;
fn main() {
let config = configuration("config.json").unwrap();
let time = config.get(&"TIMER".to_string()) .expect("Key not present");
print!("{}", time);
}
If you want to contribute to this crate please take a look to Click Me.