pub struct DittoError { /* private fields */ }Expand description
Implementations§
Source§impl DittoError
impl DittoError
Sourcepub fn encryption_error_kind(&self) -> Option<CoreApiErrorKind>
pub fn encryption_error_kind(&self) -> Option<CoreApiErrorKind>
If this error originated from the store’s encryption layer, returns the
specific CoreApiErrorKind describing it; otherwise None.
This groups the encryption-related CoreApiErrorKind variants so that
callers can react to encryption problems without matching each variant
individually. The variants covered are:
CoreApiErrorKind::EncryptionKeyRequiredCoreApiErrorKind::EncryptionKeyUnexpectedCoreApiErrorKind::EncryptionKeyInvalidCoreApiErrorKind::EncryptionUnsupportedSchemeCoreApiErrorKind::EncryptionMetadataCorrupt
An encrypted store whose contents are corrupt fails key validation the
same way, so severe corruption of an encrypted store can also surface
as CoreApiErrorKind::EncryptionKeyInvalid.
Sourcepub fn is_encryption_error(&self) -> bool
pub fn is_encryption_error(&self) -> bool
Returns true if this error originated from the store’s encryption
layer (a missing, unexpected, or invalid encryption key, an unsupported
on-disk encryption scheme, or corrupt encryption metadata).
See Self::encryption_error_kind() to recover the specific kind.
Sourcepub fn get_authentication_client_feedback(
&self,
) -> Option<AuthenticationClientFeedback>
pub fn get_authentication_client_feedback( &self, ) -> Option<AuthenticationClientFeedback>
If this is an Authentication error, get feedback from the auth provider.
The returned value may contain arbitrary JSON from the auth service with details describing the success or rejection of the authentication request.