pub enum CacheError {
BackendError(String),
SerializationError(String),
InvalidationError(String),
ConfigError(String),
NotFound,
InternalError(String),
}Expand description
Strongly-typed error enum for multi-tier-cache
Variants§
BackendError(String)
Error from a cache backend (Redis, Memcached, etc.)
SerializationError(String)
Error during serialization/deserialization
InvalidationError(String)
Error during cross-instance invalidation
ConfigError(String)
Configuration or initialization error
NotFound
Key not found in cache
InternalError(String)
Internal logic error or unexpected state
Trait Implementations§
Source§impl Clone for CacheError
impl Clone for CacheError
Source§fn clone(&self) -> CacheError
fn clone(&self) -> CacheError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
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<Error> for CacheError
impl From<Error> for CacheError
Source§impl From<RedisError> for CacheError
Available on crate feature redis only.
impl From<RedisError> for CacheError
Available on crate feature
redis only.Source§fn from(err: RedisError) -> Self
fn from(err: RedisError) -> Self
Converts to this type from the input type.
Source§impl From<TryFromIntError> for CacheError
impl From<TryFromIntError> for CacheError
Source§fn from(err: TryFromIntError) -> Self
fn from(err: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CacheError
impl RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl UnsafeUnpin 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