econf 0.3.1

Load environment variables into your struct members in one shot.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use econf::LoadEnv;

#[derive(Debug, LoadEnv)]
struct A {
    x: bool,
    y: u64,
}

fn main() {
    let a = A { x: true, y: 42 };
    println!("Before loading env: {:?}", a);

    let a = econf::load(a, "app");
    println!("After loading env: {:?}", a);
}