loadsmith_install/
error.rs1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error(transparent)]
6 Io(#[from] std::io::Error),
7
8 #[error(transparent)]
9 Zip(#[from] zip::result::ZipError),
10
11 #[error(transparent)]
12 InvalidUtf8(#[from] camino::FromPathBufError),
13
14 #[error(transparent)]
15 Walkdir(#[from] walkdir::Error),
16
17 #[error("file already exists: {0}")]
18 FileAlreadyExists(PathBuf),
19
20 #[error("invalid zip path: {0}")]
21 InvalidZipPath(String),
22
23 #[error("zip file index out of bounds: {index} (len={len})")]
24 ZipFileOutOfBounds { index: usize, len: usize },
25}
26
27pub type Result<T> = std::result::Result<T, Error>;