Crates.io | adhoc-figment |
lib.rs | adhoc-figment |
version | 0.1.1 |
source | src |
created_at | 2021-09-07 17:29:16.498357 |
updated_at | 2021-09-10 18:25:34.840146 |
description | An ad hoc provider for figment |
homepage | |
repository | https://github.com/Person-93/adhoc-figment |
max_upload_size | |
id | 448150 |
size | 8,861 |
An ad hoc provider for the figment configuration library.
use figment::Figment;
use adhoc_figment::AdHocProvider;
fn main() {
let ad_hoc = AdHocProvider::new("key", "value");
let figment = Figment::from(ad_hoc);
let value: String = figment.extract_inner("key").unwrap();
assert_eq!(value, "value");
}