baichun-framework-cache 0.1.0

Cache module for Baichun-Rust framework
Documentation
use thiserror::Error;

/// Result type for local cache operations
pub type Result<T> = std::result::Result<T, LocalError>;

/// Local cache errors
#[derive(Debug, Error)]
pub enum LocalError {
    /// Error during value serialization
    #[error("Failed to serialize value: {0}")]
    Serialization(String),

    /// Error during value deserialization
    #[error("Failed to deserialize value: {0}")]
    Deserialization(String),

    /// Cache already initialized
    #[error("Local cache already initialized")]
    AlreadyInitialized,
}