dotenv

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