
#[derive(Display, Debug)]
pub enum FramingError {
   EncodeErr(String),
   DecodeErr(String),
   IoError(String)
}

impl Error for FramingError {}

impl From<std::io::Error> for FramingError {
   fn from(err: std::io::Error) -> FramingError {
       FramingError::IoError(err.to_string())
   }