use std::fmt;
#[derive(Debug, PartialEq, Eq)]
pub enum Error {
Closed,
WontFit(Vec<u8>)
}
impl std::error::Error for Error {}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::Closed => write!(f, "Remote end-point has closed"),
Self::WontFit(_buf) => write!(f, "Buffer will not fit")
}
}
}