pub fn vars() -> Vars
Expand description
Load the .env
file and return an iterator of (variable, value) pairs of strings,
for all the environment variables of the current process.
The returned iterator contains a snapshot of the process’s environment variables at the time of this invocation, modifications to environment variables afterwards will not be reflected in the returned iterator.
For more details, please visit load
or std::env::vars
.
Examples
let vars: Vec<(String, String)> = dotenv::vars().collect();