wrath 0.1.0

A structured approach to accessing environment variables
Documentation
use std::path::PathBuf;

use wrath::{parser, TryFromEnv};

#[derive(Debug, TryFromEnv)]
#[wrath(error(
    #[derive(Debug)]
    EnvError
))]
struct Env {
    #[allow(dead_code)]
    foo: parser::From<PathBuf>,
}

#[test]
fn ok() {
    make_snapshot_test!(
        Env,
        env_map! {
            "FOO" = "some/path",
        }
    );
}

#[test]
#[should_panic = expect_msg!()]
fn unset() {
    make_snapshot_test!(Env, env_map! {});
}