use std::path::PathBuf;
use wrath::{parser, TryFromEnv};
#[derive(Debug, TryFromEnv)]
#[wrath(
// This required attribute key-value pair gives the derive macro information
// about the error type to generate. The value must contain at least the
// name thereof.
error(
/// This doc comment will appear on the generated type
// Attributes can also be applied to the type
#[derive(Debug)]
// The name of the error type to generate
EnvError
),
)]
struct Env {
#[allow(dead_code)]
foo: parser::FromStr<u32>,
#[allow(dead_code)]
bar: parser::From<PathBuf>,
#[allow(dead_code)]
baz: Option<parser::IntoString>,
}
fn main() {
println!("{:#?}", Env::try_from_env());
}