pub trait EnvSource:
Debug
+ Send
+ Sync {
// Required method
fn var(&self, key: &str) -> Option<String>;
}Expand description
Read-only access to process environment variables.
Abstracts environment lookups so tests can inject deterministic values instead of mutating process-global state. Mutating the real environment races with other tests running in parallel threads of the same process.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".