#[non_exhaustive]pub enum IdentityError {
UnsupportedKind(IdentityKind),
UnsupportedAlgorithm(JwsAlgorithm),
NoVerificationMethod(Did),
KeyStore(KeyStoreError),
Produce(ProduceError),
Jwk(JwkError),
}Expand description
Why an Identity cannot answer for a kind and algorithm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsupportedKind(IdentityKind)
The identity has no identifier of this kind: no key is bound to it, or nothing can produce a DID of the method (and namespace).
UnsupportedAlgorithm(JwsAlgorithm)
The identity has an identifier of the kind, but no key for this algorithm, or the key store cannot sign with it.
NoVerificationMethod(Did)
The document a producer made for the key has no verification method to name in kid.
KeyStore(KeyStoreError)
The key store failed, or refused the key for the algorithm.
Produce(ProduceError)
The DID producer failed.
Jwk(JwkError)
The thumbprint of the public key could not be computed.
Trait Implementations§
Source§impl Debug for IdentityError
impl Debug for IdentityError
Source§impl Display for IdentityError
impl Display for IdentityError
Source§impl Error for IdentityError
impl Error for IdentityError
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<JwkError> for IdentityError
impl From<JwkError> for IdentityError
Source§impl From<KeyStoreError> for IdentityError
impl From<KeyStoreError> for IdentityError
Source§fn from(source: KeyStoreError) -> Self
fn from(source: KeyStoreError) -> Self
Converts to this type from the input type.
Source§impl From<ProduceError> for IdentityError
impl From<ProduceError> for IdentityError
Source§fn from(source: ProduceError) -> Self
fn from(source: ProduceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for IdentityError
impl !UnwindSafe for IdentityError
impl Freeze for IdentityError
impl Send for IdentityError
impl Sync for IdentityError
impl Unpin for IdentityError
impl UnsafeUnpin for IdentityError
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