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§
Sourcefn exported_var(&self, name: &Self::VarName) -> Option<(&Self::Var, bool)>
fn exported_var(&self, name: &Self::VarName) -> Option<(&Self::Var, bool)>
Get the value of some variable and whether it is exported.
Sourcefn set_exported_var(
&mut self,
name: Self::VarName,
val: Self::Var,
exported: bool,
)
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.