pub struct Environment {
    pub working_dir: DirRef,
    pub variables: HashMap<String, String>,
}
Expand description

A structure that contains environment state for a given Task or group of Tasks.

A default environment can be created with the following state:

  • The working directory is the root directory.

Fields§

§working_dir: DirRef

The “current working directory”, i.e., where a task’s relative path begins upon first execution.

§variables: HashMap<String, String>

Implementations§

Returns the absolute file path of the current working directory.

Changes the current working directory.

Returns the value of the environment variable with the given key.

Sets an environment variable with the given key and value.

Unsets the environment variable with the given key.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.