pub enum StorageError {
InitializationError(String),
WriteError(String),
QueryError(String),
DiskFullError(String),
CorruptionError(String),
PermissionError(String),
ConfigError(String),
PurgeError(String),
DatabaseError(String),
IoError(String),
SerializationError(String),
}Expand description
Generic storage errors returned by StorageBackend implementations.
All variants carry string payloads so this type has no dependency on any
database library. Backend-specific error types should convert to these via
a From impl.
Variants§
InitializationError(String)
Storage initialization failed.
WriteError(String)
Write operation failed.
QueryError(String)
Query operation failed.
DiskFullError(String)
Disk is full or insufficient space.
CorruptionError(String)
Storage corruption detected.
PermissionError(String)
Permission denied.
ConfigError(String)
Configuration error.
PurgeError(String)
Purge operation failed.
DatabaseError(String)
Underlying database error (string representation).
IoError(String)
I/O error (string representation).
SerializationError(String)
Serialization error (string representation).
Implementations§
Source§impl StorageError
impl StorageError
pub fn is_recoverable(&self) -> bool
pub fn is_corruption(&self) -> bool
pub fn is_disk_full(&self) -> bool
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
1.30.0 · 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<StorageError> for StorageError
impl From<StorageError> for StorageError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StorageError
impl RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnsafeUnpin for StorageError
impl UnwindSafe for StorageError
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