Struct conch_runtime::env::VarEnv [] [src]

pub struct VarEnv<N: Eq + Hash, V> { /* fields omitted */ }

An environment module for setting and getting shell variables.

Uses Rc internally. For a possible Send and Sync implementation, see env::atomic::VarEnv.

Methods

impl<N: Eq + Hash, V> VarEnv<N, V>
[src]

[src]

Constructs a new environment with no environment variables.

[src]

Constructs a new environment and initializes it with the environment variables of the current process.

[src]

Constructs a new environment with a provided collection of (key, value) environment variable pairs. These variables (if any) will be inherited by all commands.

Trait Implementations

impl<N: PartialEq + Eq + Hash, V: PartialEq> PartialEq for VarEnv<N, V>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<N: Eq + Eq + Hash, V: Eq> Eq for VarEnv<N, V>
[src]

impl<N: Eq + Hash + Clone, V: Clone + Eq> VariableEnvironment for VarEnv<N, V>
[src]

The type of the name this environment associates for a variable.

The type of variables this environment holds.

[src]

Get the value of some variable. The values of both shell-only and environment variables will be looked up and returned. Read more

[src]

Set the value of some variable, maintaining its status as an environment variable if previously set as such. Read more

[src]

Unset the value of some variable (including environment variables). Get all current pairs of environment variables and their values. Read more

impl<N: Eq + Hash + Clone, V: Clone + Eq> ExportedVariableEnvironment for VarEnv<N, V>
[src]

[src]

Get the value of some variable and whether it is exported.

[src]

Set the value of some variable, and set it's exported status as specified.

impl<N: Eq + Hash + Clone, V: Eq + Clone> UnsetVariableEnvironment for VarEnv<N, V>
[src]

[src]

Unset the value of some variable (including environment variables).

impl<N: Eq + Ord + Hash + Debug, V: Debug> Debug for VarEnv<N, V>
[src]

[src]

Formats the value using the given formatter.

impl<N: Eq + Hash, V> Default for VarEnv<N, V>
[src]

[src]

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

impl<N: Eq + Hash, V> Clone for VarEnv<N, V>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Eq + Hash, V> SubEnvironment for VarEnv<N, V>
[src]

[src]

Create a new sub-environment, which starts out idential to its parent, but any changes on the new environment will not be reflected on the parent. Read more