use thiserror::Error;
use std::io;
#[derive(Error, Debug)]
pub enum MemoryError {
#[error("IO error: {0}")]
Io(#[from] io::Error),
#[error("Git error: {0}")]
Git(#[from] git2::Error),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Configuration error: {0}")]
Config(String),
#[error("Search error: {0}")]
Search(String),
#[error("File not found: {0}")]
FileNotFound(String),
#[error("Internal error: {0}")]
Internal(String),
}
pub type Result<T> = std::result::Result<T, MemoryError>;