Module env

Source
Expand description

Lower-level utilities for mocking the process environment.

Structs§

OsEnv
Implements Env for the OS context, both Unix style and Windows.

Constants§

OS_ENV

Traits§

Env
Permits parameterizing the home functions via the _from variants - used for in-process unit testing by rustup.

Functions§

cargo_home_with_cwd_env
Variant of cargo_home_with_cwd where the environment source is parameterized.
cargo_home_with_env
Variant of cargo_home where the environment source is parameterized.
home_dir_with_env
Returns the path of the current user’s home directory from Env::home_dir.
rustup_home_with_cwd_env
Variant of cargo_home_with_cwd where the environment source is parameterized.
rustup_home_with_env
Variant of cargo_home_with_cwd where the environment source is parameterized.