pub enum PLCDIDError {
Show 27 variants
HttpRequestFailed {
url: String,
error: Error,
},
DocumentParseFailed {
url: String,
error: Error,
},
InvalidDidFormat {
details: String,
},
InvalidBase32 {
details: String,
},
InvalidBase64Url {
details: String,
},
OperationTooLarge {
size: usize,
max: usize,
},
InvalidRotationKeys {
details: String,
},
InvalidVerificationMethods {
details: String,
},
InvalidService {
details: String,
},
TooManyEntries {
field: String,
max: usize,
actual: usize,
},
DuplicateEntry {
field: String,
value: String,
},
DagCborEncodeFailed {
details: String,
},
DagCborDecodeFailed {
details: String,
},
SignatureVerificationFailed,
InvalidCid {
details: String,
},
InvalidOperationType {
details: String,
},
MissingField {
field: String,
},
ChainValidationFailed {
details: String,
},
EmptyChain,
FirstOperationNotGenesis,
InvalidPrev {
details: String,
},
ForkResolutionError {
details: String,
},
InvalidAlsoKnownAs {
details: String,
},
InvalidTimestamp {
details: String,
},
SubmissionFailed {
url: String,
status: u16,
body: String,
},
AuditLogFetchFailed {
url: String,
error: Error,
},
AuditLogParseFailed {
url: String,
error: Error,
},
}Expand description
Error types that can occur when working with PLC DIDs
Variants§
HttpRequestFailed
Occurs when the HTTP request to the PLC directory fails
DocumentParseFailed
Occurs when the DID document cannot be parsed from the PLC directory response
InvalidDidFormat
Occurs when a DID string cannot be parsed as a valid did:plc identifier
InvalidBase32
Occurs when base32 decoding fails
InvalidBase64Url
Occurs when base64url decoding fails
OperationTooLarge
Occurs when an operation exceeds the maximum allowed size
InvalidRotationKeys
Occurs when rotation keys fail validation
InvalidVerificationMethods
Occurs when verification methods fail validation
InvalidService
Occurs when a service endpoint fails validation
TooManyEntries
Occurs when a field exceeds its maximum entry count
Fields
DuplicateEntry
Occurs when a duplicate value is found in a field
DagCborEncodeFailed
Occurs when DAG-CBOR encoding fails
DagCborDecodeFailed
Occurs when DAG-CBOR decoding fails
SignatureVerificationFailed
Occurs when an operation’s signature cannot be verified
InvalidCid
Occurs when a CID is invalid or cannot be computed
InvalidOperationType
Occurs when an operation has an unrecognized type
MissingField
Occurs when a required field is missing from an operation
ChainValidationFailed
Occurs when operation chain validation fails
EmptyChain
Occurs when an operation chain is empty
FirstOperationNotGenesis
Occurs when the first operation in a chain is not a genesis operation
InvalidPrev
Occurs when an operation references an invalid previous operation
ForkResolutionError
Occurs when fork resolution fails
InvalidAlsoKnownAs
Occurs when an also-known-as URI is invalid
InvalidTimestamp
Occurs when a timestamp is invalid
SubmissionFailed
Occurs when submitting an operation to the PLC directory fails
Fields
AuditLogFetchFailed
Occurs when fetching the audit log from the PLC directory fails
AuditLogParseFailed
Occurs when the audit log response cannot be parsed
Trait Implementations§
Source§impl Debug for PLCDIDError
impl Debug for PLCDIDError
Source§impl Display for PLCDIDError
impl Display for PLCDIDError
Source§impl Error for PLCDIDError
impl Error for PLCDIDError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for PLCDIDError
impl !UnwindSafe for PLCDIDError
impl Freeze for PLCDIDError
impl Send for PLCDIDError
impl Sync for PLCDIDError
impl Unpin for PLCDIDError
impl UnsafeUnpin for PLCDIDError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.