Function dotenv::dotenv [] [src]

pub fn dotenv() -> Result<()DotenvError>

This is usually what you want. It loads the .env file located in the environment's current directory. If it cannot find one, it tries the directory where cargo found Cargo.toml.

Examples

use dotenv;
dotenv::dotenv().ok();