use std::error::Error;
use std::fmt::{Debug, Display, Formatter};
#[derive(Debug, Eq, PartialEq)]
pub struct DecodeError {
cause: String
}
impl DecodeError {
pub fn new(cause: String) -> Self {
Self {
cause
}
}
}
impl Display for DecodeError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "decode error : {}", self.to_string())
}
}
impl Error for DecodeError {}