Function get_env::vars_os[][src]

pub fn vars_os() -> Option<Vec<(OsString, OsString)>>

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

extern crate get_env;

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