pub enum ResolutionError {
DidNotFound {
did: String,
},
InvalidDid {
did: String,
reason: String,
},
KeyRevoked {
did: String,
},
Network(NetworkError),
}Expand description
Domain error for identity resolution operations.
Distinguishes resolution-specific failures (unknown DID, revoked key)
from general transport failures via the Network variant.
Usage:
ⓘ
use auths_core::ports::network::ResolutionError;
fn handle(err: ResolutionError) {
match err {
ResolutionError::DidNotFound { did } => eprintln!("unknown: {did}"),
ResolutionError::InvalidDid { did, reason } => eprintln!("{did}: {reason}"),
ResolutionError::KeyRevoked { did } => eprintln!("revoked: {did}"),
ResolutionError::Network(inner) => eprintln!("transport: {inner}"),
}
}Variants§
DidNotFound
The DID was not found.
InvalidDid
The DID is malformed.
KeyRevoked
The key for this DID has been revoked.
Network(NetworkError)
A network error occurred during resolution.
Trait Implementations§
Source§impl Debug for ResolutionError
impl Debug for ResolutionError
Source§impl Display for ResolutionError
impl Display for ResolutionError
Source§impl Error for ResolutionError
impl Error for ResolutionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<NetworkError> for ResolutionError
impl From<NetworkError> for ResolutionError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResolutionError
impl !RefUnwindSafe for ResolutionError
impl Send for ResolutionError
impl Sync for ResolutionError
impl Unpin for ResolutionError
impl UnsafeUnpin for ResolutionError
impl !UnwindSafe for ResolutionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more