#[derive(Debug)] pub struct Error(Box); pub type Result = std::result::Result; pub(crate) fn convert_err(e: E) -> Error { Error(format!("{e:?}").into()) } impl> From for Error { fn from(value: T) -> Self { convert_err(value.as_ref()) } } impl ToString for Error { fn to_string(&self) -> String { format!("{:?}", self.0) } }