Skip to main content

rs_zero/cache/
error.rs

1use thiserror::Error;
2
3/// Cache result type.
4pub type CacheResult<T> = Result<T, CacheError>;
5
6/// Errors returned by cache backends.
7#[derive(Debug, Error)]
8pub enum CacheError {
9    /// Serialization failed.
10    #[error("cache serialization error: {0}")]
11    Serde(#[from] serde_json::Error),
12
13    /// Backend operation failed.
14    #[error("cache backend error: {0}")]
15    Backend(String),
16}