[−][src]Function loadenv::load
pub fn load() -> Result<bool, String>
Finds and loads a .env
from env::current_dir()
.
- If a
.env
file is not present, this returnsfalse
. - If a
.env
file is found and loaded successfully, this returnstrue
.
Panics
If a .env
file exists but cannot be read, load()
will panic.
Examples
use loadenv; loadenv::load().ok();