1 2 3 4 5 6 7 8 9 10 11 12
#[derive(Debug, PartialEq, Clone)] pub enum ErrorType { ParserError, InvalidMethod, InvalidCode, } #[derive(Debug, PartialEq, Clone)] pub struct Error { pub err_type: ErrorType, pub msg: String, }