use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum InfraError {
#[error("store error ({op}): {reason}")]
Store { op: &'static str, reason: String },
#[error("hash computation failed ({op}): {reason}")]
Hash { op: &'static str, reason: String },
#[error("transfer failed: {reason}")]
Transfer { reason: String },
#[error("file not found: {}", .0.display())]
FileNotFound(PathBuf),
#[error("serialization error: {0}")]
Serialization(String),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("initialization failed: {0}")]
Init(String),
}