#[non_exhaustive]pub enum BackendError {
Show 25 variants
StorageAlreadyOwned {
namespace: String,
},
StoreStateStorageUnsupported,
InvalidStoreStateStagingToken,
InvalidStoreStateView,
StoreStateNamespaceImmutable,
RecordTooLarge {
encoded_bytes: usize,
},
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: ID,
},
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
StorageAlreadyOwned
Another Eidetica backend already owns this storage namespace.
StoreStateStorageUnsupported
The backend does not cache Store state as records.
InvalidStoreStateStagingToken
A staging token does not identify a private unpublished build.
InvalidStoreStateView
A Store-state view does not identify a published record set.
The record set was cleared after the view was minted, or the view never
identified a published record set. This is never a missing key or an
empty page: reads against a live view still report those as
None and empty pages.
StoreStateNamespaceImmutable
A published record set cannot be changed after publication.
RecordTooLarge
One encoded record cannot fit in a protocol frame.
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.
This engine never produces this error: find_merge_base reports
disjoint histories as Ok(None) (the empty-base merge) rather than
failing. The variant is kept because peers running older versions
still emit it over the service wire (see the decode table in
service::error), and removing an existing variant is a breaking
change.
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.
Sourcepub fn is_unsupported_store_state(&self) -> bool
pub fn is_unsupported_store_state(&self) -> bool
Whether this error means the backend does not cache Store state as records.
Only BackendError::StoreStateStorageUnsupported reports this. Every
other failure — invalid tokens, invalid views, storage I/O — is genuine
and must propagate, never fall back.
Sourcepub fn is_invalid_store_state_view(&self) -> bool
pub fn is_invalid_store_state_view(&self) -> bool
Whether this error means a Store-state view no longer identifies a published record set (cleared after minting, or never published).
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
use the Display impl or to_string()
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 UnsafeUnpin 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> 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