#[non_exhaustive]pub enum DidParseError {
InvalidDevicePrefix(String),
InvalidIdentityPrefix(String),
EmptyIdentifier,
InvalidFormat(String),
ControlCharacters,
}Expand description
Errors from DID string parsing and validation.
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.
InvalidDevicePrefix(String)
DeviceDID must start with did:key:z.
InvalidIdentityPrefix(String)
IdentityDID must start with did:keri:.
EmptyIdentifier
The method-specific identifier portion is empty.
InvalidFormat(String)
Generic DID format validation failure (used by CanonicalDid).
ControlCharacters
DID string contains control characters.
Trait Implementations§
Source§impl Clone for DidParseError
impl Clone for DidParseError
Source§fn clone(&self) -> DidParseError
fn clone(&self) -> DidParseError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DidParseError
impl Debug for DidParseError
Source§impl Display for DidParseError
impl Display for DidParseError
Source§impl Error for DidParseError
impl Error for DidParseError
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 PartialEq for DidParseError
impl PartialEq for DidParseError
impl Eq for DidParseError
impl StructuralPartialEq for DidParseError
Auto Trait Implementations§
impl Freeze for DidParseError
impl RefUnwindSafe for DidParseError
impl Send for DidParseError
impl Sync for DidParseError
impl Unpin for DidParseError
impl UnsafeUnpin for DidParseError
impl UnwindSafe for DidParseError
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