pub async fn read_and_parse<T: FromStr>(
    fd: &mut File
) -> Result<T, Box<dyn Error>>
Expand description

Read a bit of data from fd (at offset zero) and parse it as a T.

(While not strictly required, the expectation is that fd refers to a sysfs file that contains a single integer.)