use std::fmt;
#[derive(Debug)]
#[non_exhaustive]
pub enum PrivacyError {
InvalidPattern(String),
EmptySalt,
}
impl fmt::Display for PrivacyError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidPattern(msg) => write!(f, "invalid PII pattern: {msg}"),
Self::EmptySalt => write!(f, "pseudonymization salt must not be empty"),
}
}
}
impl std::error::Error for PrivacyError {}