use std::fmt;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct FieldValueError {
reason: &'static str,
}
impl FieldValueError {
pub const fn new(reason: &'static str) -> Self {
Self { reason }
}
pub const fn reason(&self) -> &'static str {
self.reason
}
}
impl fmt::Display for FieldValueError {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str(self.reason)
}
}
impl std::error::Error for FieldValueError {}