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