[][src]Crate ezconf

ezconf

A library to add configuration options to your project with as little boilerplate as possible. Uses toml as the configuration format.

Note: In previous versions, values were cached. This is no longer the case! If you need maximum performance, call get before doing anything time-critical.

Example

extern crate ezconf;

static CONFIG: ezconf::Config = ezconf::INIT;

fn main() {
    CONFIG
        .init([ezconf::Source::File("tests/test.toml")].iter())
        .unwrap();

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

Re-exports

pub extern crate toml;
pub use config::Config;
pub use config::INIT;
pub use source::Source;

Modules

config

Configuration

source

Configuration Sources