use displaydoc::Display;
use std::{fmt::Debug, str::FromStr};
#[derive(Display, Debug, PartialEq)]
pub enum InterpolatorError<K>
where
K: Debug + FromStr + PartialEq,
K::Err: Debug + PartialEq,
{
#[displaydoc("Invalid placeholder: {0:?}")]
InvalidPlaceholder(K::Err),
#[displaydoc("Missing placeholder: {0:?}")]
MissingPlaceholder(K),
#[displaydoc("Unclosed placeholder")]
UnclosedPlaceholder,
#[displaydoc("Unclosed quoted literal")]
UnclosedQuotedLiteral,
}
impl<K> std::error::Error for InterpolatorError<K>
where
K: Debug + FromStr + PartialEq,
K::Err: Debug + PartialEq,
{
}