ezconf 0.3.0

A library for easily making your program configurable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate ezconf;

fn main() {
    env_logger::Builder::from_default_env()
        .filter_level(log::LevelFilter::Trace)
        .init();
    let config = ezconf::INIT;

    config
        .init([ezconf::Source::File("tests/test.toml")].iter())
        .unwrap();

    let v = config.get_or::<String>("string.a", "Hello String".into());
    info!("Value: {:?}", v);
}