1use std::path::PathBuf;
10
11#[derive(Debug, thiserror::Error)]
13pub enum InfraError {
14 #[error("store error ({op}): {reason}")]
15 Store { op: &'static str, reason: String },
16
17 #[error("hash computation failed ({op}): {reason}")]
18 Hash { op: &'static str, reason: String },
19
20 #[error("transfer failed: {reason}")]
21 Transfer { reason: String },
22
23 #[error("file not found: {}", .0.display())]
24 FileNotFound(PathBuf),
25
26 #[error("serialization error: {0}")]
27 Serialization(String),
28
29 #[error("io error: {0}")]
30 Io(#[from] std::io::Error),
31
32 #[error("initialization failed: {0}")]
33 Init(String),
34}