#[non_exhaustive]pub enum TrustRegistryError {
IssuerNotFound(String),
InvalidIssuerStatus {
status: IssuerStatus,
},
CredentialTypeNotPermitted {
credential_type: String,
issuer_did: String,
},
Http(HttpError),
Cache(String),
}Expand description
Trust registry specific errors.
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.
IssuerNotFound(String)
Issuer not found in trust registry
InvalidIssuerStatus
Issuer status is invalid (suspended or revoked)
Fields
§
status: IssuerStatusThe invalid status
CredentialTypeNotPermitted
Credential type not permitted for issuer
Http(HttpError)
HTTP error from trust registry API
Cache(String)
Cache error
Implementations§
Source§impl TrustRegistryError
impl TrustRegistryError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Check if this error is retryable.
Sourcepub fn issuer_not_found(did: impl Into<String>) -> Self
pub fn issuer_not_found(did: impl Into<String>) -> Self
Create an issuer not found error.
Sourcepub const fn invalid_status(status: IssuerStatus) -> Self
pub const fn invalid_status(status: IssuerStatus) -> Self
Create an invalid issuer status error.
Sourcepub fn credential_not_permitted(
credential_type: impl Into<String>,
issuer_did: impl Into<String>,
) -> Self
pub fn credential_not_permitted( credential_type: impl Into<String>, issuer_did: impl Into<String>, ) -> Self
Create a credential type not permitted error.
Sourcepub const fn suggested_retry_delay_ms(&self) -> Option<u64>
pub const fn suggested_retry_delay_ms(&self) -> Option<u64>
Get suggested retry delay in milliseconds.
Returns Some(delay) for retryable errors, None otherwise.
Delegates to inner HttpError for HTTP-related errors.
Trait Implementations§
Source§impl Debug for TrustRegistryError
impl Debug for TrustRegistryError
Source§impl Display for TrustRegistryError
impl Display for TrustRegistryError
Source§impl Error for TrustRegistryError
impl Error for TrustRegistryError
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<HttpError> for TrustRegistryError
impl From<HttpError> for TrustRegistryError
Source§impl From<TrustRegistryError> for LastIDError
impl From<TrustRegistryError> for LastIDError
Source§fn from(source: TrustRegistryError) -> Self
fn from(source: TrustRegistryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TrustRegistryError
impl RefUnwindSafe for TrustRegistryError
impl Send for TrustRegistryError
impl Sync for TrustRegistryError
impl Unpin for TrustRegistryError
impl UnsafeUnpin for TrustRegistryError
impl UnwindSafe for TrustRegistryError
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> 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> 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.