23 lines
586 B
Rust
23 lines
586 B
Rust
use thiserror::Error;
|
|
|
|
/// Error type for HeroDB operations
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error("Database error: {0}")]
|
|
DbError(#[from] crate::db::error::DbError),
|
|
|
|
#[error("I/O error: {0}")]
|
|
IoError(#[from] std::io::Error),
|
|
|
|
#[error("Serialization error: {0}")]
|
|
SerializationError(#[from] bincode::Error),
|
|
|
|
#[error("OurDB error: {0}")]
|
|
OurDbError(#[from] ourdb::Error),
|
|
|
|
#[error("General error: {0}")]
|
|
GeneralError(String),
|
|
}
|
|
|
|
/// Result type for HeroDB operations
|
|
pub type Result<T> = std::result::Result<T, Error>; |