pub fn dotenv_iter() -> Result<Iter<File>>
๐Deprecated since 0.14.1: please use
from_path
in conjunction with var
insteadExpand 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);
}