use std::{error, fmt};
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug)]
pub enum Error {
Custom(anyhow::Error),
}
impl error::Error for Error {}
impl fmt::Display for Error {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::Custom(e) => formatter.write_str(&e.to_string()),
}
}
}
impl From<anyhow::Error> for Error {
fn from(e: anyhow::Error) -> Self {
Error::Custom(e)
}
}