Expand description
Centralized RAII environment-variable mutation for tests.
All test-side environment manipulation belongs here — ad-hoc guards and
inline unsafe { std::env::set_var } blocks scattered across test files
create uncoordinated global state mutations. Use EnvVarGuard instead.
Safety contract: std::env::{set_var, remove_var} mutate process-global
state and are thread-unsafe on some platforms. Callers MUST serialize
multi-threaded environment mutation (#[serial(...)]) or run inside a
process-isolated integration binary.
Structs§
- EnvVar
Guard - Mutates an environment variable for the duration of the guard, restoring the original state on drop.