baichun_framework_cache/local/
error.rs

1use thiserror::Error;
2
3/// Result type for local cache operations
4pub type Result<T> = std::result::Result<T, LocalError>;
5
6/// Local cache errors
7#[derive(Debug, Error)]
8pub enum LocalError {
9    /// Error during value serialization
10    #[error("Failed to serialize value: {0}")]
11    Serialization(String),
12
13    /// Error during value deserialization
14    #[error("Failed to deserialize value: {0}")]
15    Deserialization(String),
16
17    /// Cache already initialized
18    #[error("Local cache already initialized")]
19    AlreadyInitialized,
20}