Function dotenv::dotenv_iter [] [src]

pub fn dotenv_iter() -> Result<Iter<File>>

Like dotenv, but returns an iterator over variables instead of loading into environment.

Examples

use dotenv;

for item in dotenv::dotenv_iter().unwrap() {
  let (key, val) = item.unwrap();
  println!("{}={}", key, val);
}