binsync/error.rs
1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum Error {
6 #[error("File not found {0}")]
7 FileNotFound(PathBuf),
8
9 #[error("Directory not found {0}")]
10 DirectoryNotFound(PathBuf),
11
12 #[error("Chunk not found {0}")]
13 ChunkNotFound(u64),
14
15 #[error("Access is denied")]
16 AccessDenied,
17
18 #[error("Unspecified: {0}")]
19 Unspecified(String),
20
21 #[error(transparent)]
22 IOError(#[from] std::io::Error),
23}