entrenar/monitor/storage/error.rs
1//! Storage error types
2
3/// Result type for storage operations
4pub type StorageResult<T> = Result<T, StorageError>;
5
6/// Storage errors
7#[derive(Debug, thiserror::Error)]
8pub enum StorageError {
9 #[error("IO error: {0}")]
10 Io(#[from] std::io::Error),
11
12 #[error("Serialization error: {0}")]
13 Serialization(String),
14
15 #[error("Query error: {0}")]
16 Query(String),
17
18 #[error("Storage not initialized")]
19 NotInitialized,
20}