use std::fmt::Display; #[derive(Debug)] pub enum Error { IoError(std::io::Error), } impl std::error::Error for Error {} impl Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{self:?}") } } pub type Result = core::result::Result; impl From for Error { fn from(value: std::io::Error) -> Self { Self::IoError(value) } }