use std::fmt;
use serde::{Deserialize, Serialize};
use thiserror::Error;
#[cfg_attr(feature = "fuzzing", derive(fuzzcheck::DefaultMutator))]
#[derive(Serialize, Deserialize, Debug, Clone, Error)]
pub enum BinaryReaderError {
Error(String),
UnknownTag(String),
}
impl fmt::Display for BinaryReaderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
BinaryReaderError::Error(error) => write!(f, "{}", error),
BinaryReaderError::UnknownTag(tag) => write!(f, "Unknown tag: {}", tag),
}
}
}