1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use std::convert::Infallible;
#[derive(Debug, Clone, strum::Display)]
pub enum NamewiseError {
#[strum(serialize = "_0")]
MissingField(String),
}
impl From<Infallible> for NamewiseError {
fn from(_: Infallible) -> Self {
panic!("An Infallible should never happen")
}
}
impl std::error::Error for NamewiseError {}