#[non_exhaustive]pub enum CacheError {
Backend(String),
Unsupported(String),
}Expand description
Errors that can occur while interacting with a cache backend.
Marked #[non_exhaustive] as of 0.6.0: match arms must include a _
fallback, and future variants are then additive rather than breaking.
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.
Backend(String)
Unsupported(String)
The backend does not implement the requested operation.
Returned by the shared backends for the tag-index operations
(get_keys_by_tag, list_tags, and therefore invalidate_by_tag),
which they cannot serve. Reporting it is deliberate: up to 0.5.x they
inherited the trait defaults and answered Ok(vec![]) / Ok(0), so a
caller could not tell “nothing carried that tag” from “this backend
cannot do tags at all”.
Implementations§
Source§impl CacheError
impl CacheError
Sourcepub fn is_unsupported(&self) -> bool
pub fn is_unsupported(&self) -> bool
Reports whether this is CacheError::Unsupported.
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
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()
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