#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Unspecified;
impl std::fmt::Display for Unspecified {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("Unspecified")
}
}
impl std::error::Error for Unspecified {}
#[derive(Debug)]
pub struct KeyRejected(&'static str);
impl KeyRejected {
pub(crate) fn new(reason: &'static str) -> Self {
Self(reason)
}
#[must_use]
pub fn description_when_internal(&self) -> &'static str {
self.0
}
}
impl std::fmt::Display for KeyRejected {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "KeyRejected: {}", self.0)
}
}
impl std::error::Error for KeyRejected {}