Function std::os::envExperimental [-]  [+] [src]

pub fn env() -> Vec<(String, String)>

Returns a vector of (variable, value) pairs, for all the environment variables of the current process.

Invalid UTF-8 bytes are replaced with \uFFFD. See String::from_utf8_lossy() for details.

Example

fn main() { use std::os; // We will iterate through the references to the element returned by os::env(); for &(ref key, ref value) in os::env().iter() { println!("'{}': '{}'", key, value ); } }
use std::os;

// We will iterate through the references to the element returned by os::env();
for &(ref key, ref value) in os::env().iter() {
    println!("'{}': '{}'", key, value );
}