use std::error::Error;
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[must_use]
pub(crate) enum DiagnosticRedactionHandleError {
DifferentBatch,
MissingItem,
}
impl fmt::Display for DiagnosticRedactionHandleError {
#[inline]
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str(match self {
Self::DifferentBatch => "the handle belongs to a different batch",
Self::MissingItem => "the handle does not identify a published item",
})
}
}
impl Error for DiagnosticRedactionHandleError {}