#[non_exhaustive]pub enum DocumentError {
InvalidContext,
DuplicateVerificationMethod(DidUrl),
DuplicateService(DidUrl),
VerificationMethodNotFound(DidUrl),
ForeignDid {
url: DidUrl,
document: Did,
},
NotInRelationship {
id: DidUrl,
relationship: VerificationRelationship,
},
UnknownRelationship(String),
ReservedProperty(String),
}Expand description
Why a DidDocument operation was refused.
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.
InvalidContext
@context is not a string, a map or a non-empty array.
DuplicateVerificationMethod(DidUrl)
A verification method with this id is already in the document, or the document defines the id twice with different material.
DuplicateService(DidUrl)
A service with this id is already in the document.
VerificationMethodNotFound(DidUrl)
No verification method with this id is in the document.
ForeignDid
The DID URL belongs to another DID than the document.
NotInRelationship
The verification method exists but is not listed under the relationship.
Fields
§
relationship: VerificationRelationshipThe relationship that was required.
UnknownRelationship(String)
Not the name of a verification relationship.
ReservedProperty(String)
An extension property with the name of a core property.
Trait Implementations§
Source§impl Clone for DocumentError
impl Clone for DocumentError
Source§impl Debug for DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
impl Eq for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
1.30.0 · 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<DocumentError> for ProduceError
impl From<DocumentError> for ProduceError
Source§fn from(source: DocumentError) -> Self
fn from(source: DocumentError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DocumentError
impl PartialEq for DocumentError
impl StructuralPartialEq for DocumentError
Auto Trait Implementations§
impl Freeze for DocumentError
impl RefUnwindSafe for DocumentError
impl Send for DocumentError
impl Sync for DocumentError
impl Unpin for DocumentError
impl UnsafeUnpin for DocumentError
impl UnwindSafe for DocumentError
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.