Crates.io | strict-env |
lib.rs | strict-env |
version | 0.1.2 |
source | src |
created_at | 2021-04-13 05:29:47.017239 |
updated_at | 2021-04-16 01:59:05.512562 |
description | Parse config values from environment variables |
homepage | |
repository | https://github.com/andybarron/strict-env-rs |
max_upload_size | |
id | 382703 |
size | 20,996 |
Parse config values from environment variables
std::env::set_var("PORT", "9001"); // or e.g. dotenv::dotenv()
let port: u16 = strict_env::parse("PORT")?;
assert_eq!(port, 9001);