#[non_exhaustive]pub enum Error {
InvalidDid(&'static str),
InvalidDidUrl(&'static str),
InvalidMultikey(&'static str),
InvalidKeyLength {
expected: usize,
actual: usize,
},
InvalidAccountData(&'static str),
UnsupportedKeyType(&'static str),
SignatureVerification,
VerificationMethodNotFound,
RelationshipNotGranted,
}Expand description
Errors produced by parsing, encoding, and account deserialization.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidDid(&'static str)
The DID does not conform to the did:bio ABNF (spec Section 4.1) or its
idstring does not decode to a 32 byte key (spec Section 6.2 step 3).
InvalidDidUrl(&'static str)
The DID URL is not a did:bio DID with an optional valid fragment.
InvalidMultikey(&'static str)
A publicKeyMultibase value is not a well formed Multikey.
InvalidKeyLength
Key material length does not match the verification method type.
InvalidAccountData(&'static str)
Registry account bytes failed the discriminator check or Borsh deserialization (spec Section 6.2 step 7).
UnsupportedKeyType(&'static str)
The operation is not defined for this verification method type, such as signature verification with an X25519 key agreement key.
SignatureVerification
A signature did not verify against the given key and message.
VerificationMethodNotFound
The DID document holds no verification method with this id or fragment.
RelationshipNotGranted
The verification method is not listed under the verification relationship the check requires.
Implementations§
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()