#[non_exhaustive]pub enum RedisCacheError {
Cache(CacheError),
Redis(RedisError),
Json(Error),
}Available on crate feature
redis only.Expand description
Errors from Redis-backed cache operations: the shared CacheErrors, plus Redis and JSON
failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Cache(CacheError)
Shared cache errors, such as a CacheOptions TTL over 365 days.
Redis(RedisError)
Connection, command or protocol errors from Redis.
Json(Error)
A value couldn’t be encoded to, or decoded from, JSON. Decoding fails when the stored JSON
no longer fits the type, such as after a field was added without #[serde(default)]. The
message says where when serde knows, but leaves serde’s own message, which can quote the
data, to the error’s source.
Trait Implementations§
Source§impl Debug for RedisCacheError
impl Debug for RedisCacheError
Source§impl Display for RedisCacheError
impl Display for RedisCacheError
Source§impl Error for RedisCacheError
impl Error for RedisCacheError
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<CacheError> for RedisCacheError
impl From<CacheError> for RedisCacheError
Source§fn from(source: CacheError) -> RedisCacheError
fn from(source: CacheError) -> RedisCacheError
Converts to this type from the input type.
Source§impl From<Error> for RedisCacheError
impl From<Error> for RedisCacheError
Source§fn from(source: Error) -> RedisCacheError
fn from(source: Error) -> RedisCacheError
Converts to this type from the input type.
Source§impl From<RedisError> for RedisCacheError
impl From<RedisError> for RedisCacheError
Source§fn from(source: RedisError) -> RedisCacheError
fn from(source: RedisError) -> RedisCacheError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RedisCacheError
impl !UnwindSafe for RedisCacheError
impl Freeze for RedisCacheError
impl Send for RedisCacheError
impl Sync for RedisCacheError
impl Unpin for RedisCacheError
impl UnsafeUnpin for RedisCacheError
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