#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct UnsupportedNormalizer<'a> {
pub type_name: &'a str,
}
impl std::fmt::Display for UnsupportedNormalizer<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "no normalizer for type: {}", self.type_name)
}
}
impl std::error::Error for UnsupportedNormalizer<'_> {}
pub fn refuse(type_name: &str) -> Result<(), UnsupportedNormalizer<'_>> {
Err(UnsupportedNormalizer { type_name })
}