#[non_exhaustive]pub enum BackendError {
Show 19 variants
EntryNotFound {
id: ID,
},
EntryValidationFailed {
entry_id: ID,
reason: String,
},
VerificationStatusNotFound {
id: ID,
},
EntryNotInTree {
entry_id: ID,
tree_id: ID,
},
EntryNotInSubtree {
entry_id: ID,
tree_id: ID,
subtree: String,
},
CycleDetected {
entry_id: ID,
},
NoCommonAncestor {
entry_ids: Vec<ID>,
},
EmptyEntryList {
operation: String,
},
HeightCalculationCorruption {
reason: String,
},
PrivateKeyNotFound {
key_name: String,
},
SerializationFailed {
source: Error,
},
DeserializationFailed {
source: Error,
},
FileIo {
source: Error,
},
CrdtCacheError {
reason: String,
},
TreeIntegrityViolation {
reason: String,
},
InvalidTreeReference {
tree_id: String,
},
StateInconsistency {
reason: String,
},
CacheError {
reason: String,
},
SqlxError {
reason: String,
source: Option<Error>,
},
}Expand description
Errors that can occur during database operations.
§Stability
- New variants may be added in minor versions (enum is
#[non_exhaustive]) - Existing variants will not be removed in minor versions
- Field additions/changes require a major version bump
- Helper methods like
is_*()provide stable APIs
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EntryNotFound
Entry not found by ID.
EntryValidationFailed
Entry failed structural validation.
Fields
VerificationStatusNotFound
Verification status not found for entry.
EntryNotInTree
Entry is not part of the specified tree.
EntryNotInSubtree
Entry is not part of the specified subtree.
Fields
CycleDetected
Cycle detected in DAG structure.
NoCommonAncestor
No common ancestor found for given entries.
EmptyEntryList
Empty entry list provided where non-empty list required.
HeightCalculationCorruption
Data corruption detected during height calculation.
PrivateKeyNotFound
Private key not found.
SerializationFailed
Serialization failed.
DeserializationFailed
Deserialization failed.
FileIo
File I/O error.
CrdtCacheError
CRDT cache operation failed.
TreeIntegrityViolation
Database integrity violation detected.
InvalidTreeReference
Invalid tree reference or tree ID.
StateInconsistency
Database state inconsistency detected.
CacheError
Cache miss or cache corruption.
SqlxError
SQL database error (sqlx).
Implementations§
Source§impl BackendError
impl BackendError
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this error indicates a resource was not found.
Sourcepub fn is_integrity_error(&self) -> bool
pub fn is_integrity_error(&self) -> bool
Check if this error indicates a data integrity issue.
Sourcepub fn is_io_error(&self) -> bool
pub fn is_io_error(&self) -> bool
Check if this error is related to I/O operations.
Sourcepub fn is_sql_error(&self) -> bool
pub fn is_sql_error(&self) -> bool
Check if this error is related to SQL database operations.
Sourcepub fn is_cache_error(&self) -> bool
pub fn is_cache_error(&self) -> bool
Check if this error is related to cache operations.
Sourcepub fn is_logical_error(&self) -> bool
pub fn is_logical_error(&self) -> bool
Check if this error indicates a logical inconsistency.
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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
Source§impl From<BackendError> for Error
impl From<BackendError> for Error
Source§fn from(err: BackendError) -> Self
fn from(err: BackendError) -> Self
Auto Trait Implementations§
impl Freeze for BackendError
impl !RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl !UnwindSafe for BackendError
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.