andybarron / strict-env-rs

Parse config values from environment variables

Home Page:https://docs.rs/strict-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);

About

Parse config values from environment variables

https://docs.rs/strict-env

License:MIT License


Languages

Language:Rust 100.0%