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

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

An environment module for setting and getting shell variables.

Uses Arc internally. If Send and Sync is not required of the implementation, see env::VarEnv as a cheaper alternative.

Methods

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

Constructs a new environment with no environment variables.

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

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 AtomicVarEnv<N, V>
[src]

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

This method tests for !=.

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

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

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

The type of variables this environment holds.

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

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

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 AtomicVarEnv<N, V>
[src]

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

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

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

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

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

Formats the value using the given formatter. Read more

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Eq + Hash, V> SubEnvironment for AtomicVarEnv<N, V>
[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

Auto Trait Implementations

impl<N, V> Send for AtomicVarEnv<N, V> where
    N: Send + Sync,
    V: Send + Sync

impl<N, V> Sync for AtomicVarEnv<N, V> where
    N: Send + Sync,
    V: Send + Sync