pub fn from_path<T: AsRef<Path>, R: DeserializeOwned>( path: T) -> Result<R, CargoTomlError>
Reads the file at path.
path
// Reading a CargoToml let toml: CargoToml = from_path("Cargo.toml").expect("Failed to read Cargo.toml");
If reading the provided path fails, or deserialization fails.