Struct cradle::input::Env [−][src]
Expand description
Adds an environment variable to the environment of the child process.
use cradle::prelude::*;
let StdoutUntrimmed(output) = run_output!("env", Env("FOO", "bar"));
assert!(output.contains("FOO=bar\n"));
Child processes inherit the environment of the parent process.
Env
only adds environment variables to that inherited environment.
If the environment variable is also set in the parent process,
it is overwritten by Env
.
Tuple Fields
0: Key
1: Value
Trait Implementations
Auto Trait Implementations
impl<Key, Value> RefUnwindSafe for Env<Key, Value> where
Key: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Key, Value> UnwindSafe for Env<Key, Value> where
Key: UnwindSafe,
Value: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more