use crate::Tag;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct InvalidValue {
pub tag: Tag,
}
impl std::fmt::Display for InvalidValue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "invalid value in field {}", self.tag)
}
}
impl std::error::Error for InvalidValue {}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct OutOfRange;
impl std::fmt::Display for OutOfRange {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("value out of range")
}
}
impl std::error::Error for OutOfRange {}