pub enum ResolveError {
NotFound {
url: String,
},
Transport {
url: String,
message: String,
},
Malformed {
url: String,
message: String,
},
IdMismatch {
url: String,
expected: String,
found: String,
},
InvalidDid {
did: String,
method: String,
message: String,
},
UnsupportedMethod {
did: String,
method: String,
},
}Expand description
Why resolution failed.
Variants§
NotFound
No document at the URL.
Transport
The transport could not complete the request.
Malformed
The body was not a DID document.
IdMismatch
The document’s id is not the DID that was asked for.
The spec is blunt about this: “The DID declared in the document (in
the id field) should always be verified against what was expected.”
Skipping it means accepting a document that claims to be a different
account, which for did:web is whatever the host chose to serve.
Fields
InvalidDid
The DID is not a legal one of its own method — a malformed did:web
or a did:plc whose identifier is not base32-sortable. Caught before
any fetch: an unvalidated identifier joined into a URL is how a
resolver ends up requesting something other than a DID document.
Fields
UnsupportedMethod
The DID’s method is not one this resolver speaks.
Named explicitly rather than folded into Self::NotFound: a method
this resolver has no path for and a document that genuinely does not
exist are different facts, and a caller deciding whether to keep
polling needs to tell them apart.
Trait Implementations§
Source§impl Clone for ResolveError
impl Clone for ResolveError
Source§fn clone(&self) -> ResolveError
fn clone(&self) -> ResolveError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ResolveError
impl PartialEq for ResolveError
Source§fn eq(&self, other: &ResolveError) -> bool
fn eq(&self, other: &ResolveError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ResolveError
impl StructuralPartialEq for ResolveError
Auto Trait Implementations§
impl Freeze for ResolveError
impl RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl UnwindSafe for ResolveError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.