Skip to main content

chronix_engine/cache/
error.rs

1//! Cache error types.
2
3use thiserror::Error;
4
5/// Errors that can occur in the caching layer.
6#[derive(Debug, Error)]
7pub enum CacheError {
8    /// Segment I/O error.
9    #[error("Segment error: {0}")]
10    Segment(#[from] crate::segment::SegmentError),
11
12    /// Internal error.
13    #[error("Cache error: {0}")]
14    Internal(String),
15}
16
17/// A specialized `Result` type for cache operations.
18pub type Result<T> = std::result::Result<T, CacheError>;