pub enum CacheError {
KeyNotFound(String),
InvalidCommand(String),
ParseError(String),
IoError(Error),
CapacityExceeded {
current: usize,
max: usize,
},
InvalidKey(String),
InvalidValue(String),
LockError(String),
}Expand description
The main error type for cache operations.
This enum covers all possible error conditions that can occur when interacting with the cache, from key-not-found conditions to I/O errors.
Variants§
KeyNotFound(String)
The requested key was not found in the cache.
InvalidCommand(String)
The command received was invalid or malformed.
ParseError(String)
Failed to parse the input buffer or protocol message.
IoError(Error)
An I/O error occurred (network, file, etc.).
CapacityExceeded
The cache has reached its maximum capacity.
InvalidKey(String)
The provided key is invalid (empty, too long, etc.).
InvalidValue(String)
The provided value is invalid (too large, etc.).
LockError(String)
A lock could not be acquired (poisoned mutex).
Trait Implementations§
Source§impl Debug for CacheError
impl Debug for CacheError
Source§impl Display for CacheError
impl Display for CacheError
Source§impl Error for CacheError
impl Error for CacheError
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()
Auto Trait Implementations§
impl Freeze for CacheError
impl !RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl !UnwindSafe for CacheError
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