use core::fmt;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum VerifyError {
DidKey(&'static str),
Structure(&'static str),
Base64(&'static str),
Jwt(&'static str),
Time(&'static str),
}
impl fmt::Display for VerifyError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
VerifyError::DidKey(m) => write!(f, "did:key error: {m}"),
VerifyError::Structure(m) => write!(f, "structure error: {m}"),
VerifyError::Base64(m) => write!(f, "base64 error: {m}"),
VerifyError::Jwt(m) => write!(f, "jwt error: {m}"),
VerifyError::Time(m) => write!(f, "time error: {m}"),
}
}
}
#[cfg(feature = "std")]
impl std::error::Error for VerifyError {}