1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use { thiserror::Error, }; #[derive(Error, Debug)] pub enum ProcStatusError { #[error("reading /proc file failed")] Io(#[from] std::io::Error), #[error("failed to parse as integer")] ParseInt(#[from] std::num::ParseIntError), #[error("no colon in line '{0}'")] NoColon(String), #[error("no entry with key '{0}'")] EntryNotFound(String), #[error("not a kib entry")] NotInKib, }