Function dotenvy::from_path_iter

source ·
pub fn from_path_iter<P: AsRef<Path>>(path: P) -> Result<Iter<File>>
Expand description

Returns an iterator over environment variables from the specified path.

§Examples

use std::path::Path;

for item in dotenvy::from_path_iter(Path::new("path/to/.env"))? {
  let (key, val) = item?;
  println!("{}={}", key, val);
}