Skip to main content

argyph_store/
error.rs

1use thiserror::Error;
2
3/// Crate-level error type for all store operations.
4#[derive(Debug, Error)]
5pub enum StoreError {
6    #[error("SQLite error: {0}")]
7    Sqlite(#[from] rusqlite::Error),
8
9    #[error("I/O error: {0}")]
10    Io(#[from] std::io::Error),
11
12    #[error("invalid path: {0}")]
13    InvalidPath(String),
14
15    #[error("migration error: {0}")]
16    Migration(String),
17}
18
19/// Crate-level result alias.
20pub type Result<T> = std::result::Result<T, StoreError>;