pub fn vars_os() -> Option<Vec<(OsString, OsString)>> {
	if ENVP.read().unwrap().is_none() {
		let mut write = ENVP.write().unwrap();
		if write.is_none() {
			*write = Some(envp_from_global().ok().or_else(|| envp_from_proc().ok()));
		}
	}
	ENVP.read().unwrap().as_ref().unwrap().clone()
}
/// Returns a vector of (variable, value) pairs of OS strings, for all the
/// environment variables of the current process.
///
/// # Errors
///
/// This will return `None` if `get_env` can't acquire them. Please file an issue.
///
/// # Examples
///
/// ```
/// use palaver::env;
///
/// // Prints the environment variables
/// for (key, value) in env::vars_os().expect("Couldn't retrieve env vars") {
///     println!("{:?}: {:?}", key, value);
/// }
/// ```
Returns a vector of (variable, value) pairs of OS strings, for all the
environment variables of the current process.
Returns a vector of ( variable value ) pairs of OS strings for all the environment variables of the current process .
pub fn vars_os() -> Option<Vec<(OsString, OsString)>> {
	if ENVP.read().unwrap().is_none() {
		let mut write = ENVP.write().unwrap();
		if write.is_none() {
			*write = Some(envp_from_global().ok().or_else(|| envp_from_proc().ok()));
		}
	}
	ENVP.read().unwrap().as_ref().unwrap().clone()
}
pub fn vars_os ( ) -> Option < Vec < ( OsString , OsString ) > > { if ENVP . read ( ) . unwrap ( ) . is_none ( ) { let mut write = ENVP . write ( ) . unwrap ( ) ; if write . is_none ( ) { * write = Some ( envp_from_global ( ) . ok ( ) . or_else ( | | envp_from_proc ( ) . ok ( ) ) ) ; } } ENVP . read ( ) . unwrap ( ) . as_ref ( ) . unwrap ( ) . clone ( ) }
Returns a vector of (variable, value) pairs of OS strings, for all the
environment variables of the current process.
Returns a vector of ( variable value ) pairs of OS strings for all the environment variables of the current process .
errors
This will return `None` if `get_env` can't acquire them. Please file an issue.
This will return ` None ` if ` get_env ` can ' t acquire them . Please file an issue .
examples
```
use palaver::env.

Prints the environment variables
for (key, value) in env::vars_os().expect("Couldn't retrieve env vars") {
println!("{:?}: {:?}", key, value);
}
```
` ` ` use palaver :: env . Prints the environment variables for ( key value ) in env :: vars_os () . expect ( " Couldn ' t retrieve env vars " ) { println! ( " { : ? } : { : ? } " key value ) ; } ` ` `