3 releases

0.1.2 Apr 16, 2021
0.1.1 Apr 14, 2021
0.1.0 Apr 13, 2021

#873 in Configuration

MIT license

17KB
313 lines

strict-env

Parse config values from environment variables

Documentation Build status Test coverage
crates.io Downloads Rust version
MIT license

Resources

TL;DR

std::env::set_var("PORT", "9001"); // or e.g. dotenv::dotenv()
let port: u16 = strict_env::parse("PORT")?;
assert_eq!(port, 9001);

Dependencies

~255–710KB
~17K SLoC