1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/// The error message when failing to serialize/deserialize to/from the bit
/// stream.
#[derive(Clone)]
pub struct SerdeErr;
impl std::fmt::Debug for SerdeErr {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "Bin deserialize error",)
}
}
impl std::fmt::Display for SerdeErr {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Debug::fmt(self, f)
}
}
impl std::error::Error for SerdeErr {}