Function dotenv::dotenv_iter

source ·
pub fn dotenv_iter() -> Result<Iter<File>>
👎Deprecated since 0.14.1: please use from_path in conjunction with var instead
Expand description

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);
}