Struct io_providers::SimulatedEnv[][src]

pub struct SimulatedEnv { /* fields omitted */ }

Provides inspection and manipulation of a simulated process environment.

Methods

impl SimulatedEnv
[src]

Creates a new simulated environment.

Sets the arguments which this program was started with (normally passed via the command line).

Sets the arguments which this program was started with (normally passed via the command line).

Sets the path to be returned by Env::current_exe().

Sets the path to be returned by Env::home_dir().

Sets the path to be returned by Env::temp_dir().

Trait Implementations

impl Default for SimulatedEnv
[src]

Returns the "default value" for a type. Read more

impl Env for SimulatedEnv
[src]

The iterator type returned by args().

The iterator type returned by args_os().

The iterator type returned by vars().

The iterator type returned by vars_os().

Returns the arguments which this program was started with (normally passed via the command line). Read more

Returns the arguments which this program was started with (normally passed via the command line). Read more

Returns the current working directory as a PathBuf. Read more

Returns the full filesystem path of the current running executable. Read more

Deprecated since 0.2.0

: This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from crates.io/crates/dirs instead.

Returns the path of the current user's home directory if known. Read more

Removes an environment variable from the environment of the currently running process. Read more

Changes the current working directory to the specified path, returning whether the change was completed successfully or not. Read more

Sets the environment variable k to the value v for the currently running process. Read more

Returns the path of a temporary directory. Read more

Fetches the environment variable key from the current process. Read more

Fetches the environment variable key from the current process. Read more

Returns an iterator of (variable, value) pairs of strings, for all the environment variables of the current process. Read more

Returns an iterator of (variable, value) pairs of OS strings, for all the environment variables of the current process. Read more

Auto Trait Implementations