use thiserror::Error; use nom::Err; #[derive(Error, Debug)] pub enum BrokenError { #[error("Can't Open file or file not exist.")] IO(#[from] std::io::Error), #[error("This file is not standard format.")] ParseError, } impl From> for BrokenError { fn from(value: Err) -> Self { Self::ParseError } } pub type AResult = Result, BrokenError>; pub type AAResult = AResult;