#[non_exhaustive]pub enum DidKeyError {
Key(JwkError),
TooLong {
max: usize,
},
}Available on crate feature
did-key and (crate features did-jwk or did-key or did-web) only.Expand description
Why a key has no did:key.
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.
Key(JwkError)
The key has no Multikey form: an unsupported key type or undecodable material.
TooLong
The Multikey string is so long that the DID would exceed max bytes.
Fields
§
max: usizeThe maximum number of bytes, DidKey::MAX_DID_LEN.
Trait Implementations§
Source§impl Clone for DidKeyError
impl Clone for DidKeyError
Source§impl Debug for DidKeyError
impl Debug for DidKeyError
Source§impl Display for DidKeyError
impl Display for DidKeyError
impl Eq for DidKeyError
Source§impl Error for DidKeyError
impl Error for DidKeyError
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 DidKeyError
impl From<JwkError> for DidKeyError
Source§impl PartialEq for DidKeyError
impl PartialEq for DidKeyError
impl StructuralPartialEq for DidKeyError
Auto Trait Implementations§
impl !RefUnwindSafe for DidKeyError
impl !UnwindSafe for DidKeyError
impl Freeze for DidKeyError
impl Send for DidKeyError
impl Sync for DidKeyError
impl Unpin for DidKeyError
impl UnsafeUnpin for DidKeyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.