pub fn with_var<K, V, F, R>(key: K, value: Option<V>, closure: F) -> Rwhere K: AsRef<OsStr> + Clone + Eq + Hash, V: AsRef<OsStr> + Clone, F: Fn() -> R,
Sets a single environment variable for the duration of the closure.
The previous value is restored when the closure completes or panics, before unwinding the panic.
value is set to
None, then the environment variable is unset.