pub enum StorageError {
}Expand description
Errors that can occur in storage operations.
This enum covers all possible failure modes for storage backends, from database-level issues to transaction and I/O errors.
Variants§
Open(String)
The database could not be opened or created.
NotFound(String)
The database file or directory does not exist.
TableNotFound(String)
A table does not exist.
KeyNotFound
A key was not found in the table.
Transaction(String)
A transaction error occurred (failed to begin, commit, or rollback).
ReadOnly
Attempted a write operation on a read-only transaction.
Conflict(String)
A conflict occurred due to concurrent modification.
Corruption(String)
The database is corrupted.
Io(Error)
An I/O error occurred.
Serialization(String)
A serialization or deserialization error occurred.
StorageFull(String)
The storage is full or a size limit was exceeded.
InvalidArgument(String)
An invalid argument was provided.
Unsupported(String)
The operation is not supported by this backend.
Internal(String)
An internal error occurred in the storage backend.
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub const fn is_recoverable(&self) -> bool
pub const fn is_recoverable(&self) -> bool
Returns true if this error is recoverable.
Recoverable errors include transient conditions like conflicts that may succeed on retry. Non-recoverable errors include corruption and configuration issues.
Sourcepub const fn is_not_found(&self) -> bool
pub const fn is_not_found(&self) -> bool
Returns true if this is a “not found” type error.