ExportedVariableEnvironment

Trait ExportedVariableEnvironment 

Source
pub trait ExportedVariableEnvironment: VariableEnvironment {
    // Required methods
    fn exported_var(&self, name: &Self::VarName) -> Option<(&Self::Var, bool)>;
    fn set_exported_var(
        &mut self,
        name: Self::VarName,
        val: Self::Var,
        exported: bool,
    );
}
Expand description

An interface for setting and getting shell and environment variables and controlling whether or not they can appear as environment variables to subprocesses.

Required Methods§

Source

fn exported_var(&self, name: &Self::VarName) -> Option<(&Self::Var, bool)>

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

Source

fn set_exported_var( &mut self, name: Self::VarName, val: Self::Var, exported: bool, )

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T: ?Sized + ExportedVariableEnvironment> ExportedVariableEnvironment for &'a mut T

Source§

fn exported_var(&self, name: &Self::VarName) -> Option<(&Self::Var, bool)>

Source§

fn set_exported_var( &mut self, name: Self::VarName, val: Self::Var, exported: bool, )

Implementors§

Source§

impl<'a, E> ExportedVariableEnvironment for EnvRestorer<'a, E>

Source§

impl<A, FM, L, V, EX, WD, B, N, ERR> ExportedVariableEnvironment for Env<A, FM, L, V, EX, WD, B, N, ERR>

Source§

impl<N, V> ExportedVariableEnvironment for VarEnv<N, V>
where N: Eq + Clone + Hash, V: Eq + Clone,