Function read_from_file
Source pub fn read_from_file<T>(file_path: &str) -> Result<T, Box<dyn Error>>
Expand description
Reads the content of a file and converts it to the specified type.
§Arguments
&str
- The path to the file to read.
§Returns
Result<T, Box<dyn std::error::Error + Send + Sync>>
- The converted file content or an error.