pub fn from_file<T>(path: &Path) -> Result<T, Error>where
T: DeserializeOwned,Expand description
Deserialize an environment variable file into an instance of type T.
§Example
use std::path::PathBuf;
use serde_envfile::{Value, from_file};
let path = PathBuf::from(".env");
let value = from_file::<Value>(&path).expect("Failed to deserialize from file");
println!("{:?}", value);