pub enum DidRejection<'a> {
Malformed,
UnsupportedMethod(&'a str),
EmptyMethodId,
}Expand description
Why a candidate scheme 3 value is not an admissible DID.
Three variants rather than a bool because the callers report differently:
the domain has an error type per case, and a plugin turns them into one
field message. Neither should have to re-derive which case it hit.
Variants§
Malformed
Not did:<method>:<method-specific-id>, or the id breaks the W3C DID
v1.0 clause 3.1 grammar.
UnsupportedMethod(&'a str)
Well-formed, but the method is outside the closed set clause 5 names. Carries the method as read, so a caller naming it in an error does not have to take the value apart a second time.
EmptyMethodId
A named method with nothing after it — did:web: identifies no one.
Trait Implementations§
Source§impl<'a> Clone for DidRejection<'a>
impl<'a> Clone for DidRejection<'a>
impl<'a> Copy for DidRejection<'a>
Source§impl<'a> Debug for DidRejection<'a>
impl<'a> Debug for DidRejection<'a>
impl<'a> Eq for DidRejection<'a>
Source§impl<'a> PartialEq for DidRejection<'a>
impl<'a> PartialEq for DidRejection<'a>
impl<'a> StructuralPartialEq for DidRejection<'a>
Auto Trait Implementations§
impl<'a> Freeze for DidRejection<'a>
impl<'a> RefUnwindSafe for DidRejection<'a>
impl<'a> Send for DidRejection<'a>
impl<'a> Sync for DidRejection<'a>
impl<'a> Unpin for DidRejection<'a>
impl<'a> UnsafeUnpin for DidRejection<'a>
impl<'a> UnwindSafe for DidRejection<'a>
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