llm_config_storage/
lib.rs

1//! Storage backend for LLM Config Manager
2
3pub mod file;
4pub mod models;
5
6pub use models::*;
7
8use thiserror::Error;
9
10#[derive(Error, Debug)]
11pub enum StorageError {
12    #[error("IO error: {0}")]
13    IoError(#[from] std::io::Error),
14
15    #[error("Serialization error: {0}")]
16    SerializationError(String),
17
18    #[error("Not found: {0}")]
19    NotFound(String),
20
21    #[error("Already exists: {0}")]
22    AlreadyExists(String),
23
24    #[error("Invalid path: {0}")]
25    InvalidPath(String),
26
27    #[error("Crypto error: {0}")]
28    CryptoError(#[from] llm_config_crypto::CryptoError),
29}
30
31pub type Result<T> = std::result::Result<T, StorageError>;