Skip to main content

Module env

Module env 

Source
Expand description

Typesafe environment variable access for handler contexts.

Use ctx.env_require() / ctx.env_or() / ctx.env_parse() instead of std::env::var(). Test contexts inject mock values via .with_env() and track which keys were accessed for test assertions.

Structs§

MockEnvProvider
Mock environment provider for testing.
RealEnvProvider
Production environment provider that reads from std::env.

Traits§

EnvAccess
Extension methods for environment variable access on contexts.
EnvProvider
Trait for environment variable access.