Expand description
Type-safe, freeze-on-load environment variable management. Read and parse your environment once at startup into a generated struct.
Re-exports§
pub use error::EnvLockError;pub use parse::FromEnvStr;pub use parse::Secret;
Modules§
Macros§
- check
- Like
load!but panics with all errors listed, not just the first. Accepts the same syntax astry_check!. - env_
struct - Define a named, publicly accessible configuration struct with built-in
load,try_load,from_map, andtry_from_mapassociated functions. - from_
map try_from_map!variant that panics on failure.- load
- Parse the environment and panic on error; returns the generated struct.
- try_
check - Like
try_load!but collects all parse/missing errors instead of stopping at the first one. ReturnsOk(config)when every field parsed successfully, orErr(Vec<EnvLockError>)listing every problem found. - try_
from_ map - Like
try_load!but parses from a providedHashMapinstead of the OS env. - try_
load - Like
load!but returns aResult<_, EnvLockError>instead of panicking.