Trait conch_runtime::env::VariableEnvironment [] [src]

pub trait VariableEnvironment {
    type VarName: Eq + Hash;
    type Var;
    fn var<Q: ?Sized>(&self, name: &Q) -> Option<&Self::Var>
    where
        Self::VarName: Borrow<Q>,
        Q: Hash + Eq
;
fn set_var(&mut self, name: Self::VarName, val: Self::Var);
fn env_vars(&self) -> Cow<[(&Self::VarName, &Self::Var)]>; }

An interface for setting and getting shell and environment variables.

Associated Types

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

The type of variables this environment holds.

Required Methods

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

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

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

Implementations on Foreign Types

impl<'a, T: ?Sized + VariableEnvironment> VariableEnvironment for &'a mut T
[src]

[src]

[src]

[src]

Implementors