Crates.io | fetch_configuration |
lib.rs | fetch_configuration |
version | 0.2.0 |
source | src |
created_at | 2019-11-27 09:52:32.840911 |
updated_at | 2019-11-27 11:50:33.363188 |
description | Library to fetch configuration from config file. |
homepage | |
repository | https://github.com/PankajChaudhary5/fetch_configuration.git |
max_upload_size | |
id | 184787 |
size | 10,327 |
A Library to fetch the configurations form the config file.
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.