Function async_read_from_file

Source
pub async fn async_read_from_file<T>(
    file_path: &str,
) -> Result<T, Box<dyn Error>>
where T: From<Vec<u8>>,
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>> - The converted file content or an error.