envcfg 0.0.1

A Rust crate for environment configuration management.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use envcfg::EnvCfg;

#[derive(EnvCfg)]
pub struct DbConfig {
    host: String,
    port: String,
}

fn main() {
    let cfg = DbConfig::builder().load_from_env().build().unwrap();

    assert_eq!(cfg.host(),);
}