1use derive_more::{Display, Error};
2
3#[derive(Debug, Display, Clone, Error)]
4#[display("interrupted by signal")]
5pub struct InterruptError;
6
7#[derive(Debug, Display, Clone, Error)]
8#[display("error during I/O")]
9pub struct IOError;
10
11#[derive(Debug, Display, Clone, Error)]
12#[display("available storage space exhausted")]
13pub struct StorageExhaustedError;
14
15#[derive(Debug, Display, Clone, Error)]
16#[display("sync not supported by file")]
17pub struct SyncUnsupportedError;
18
19#[derive(Debug, Display, Clone, Error)]
20#[display("file metadata would overflow capacity")]
21pub struct MetadataOverflowError;
22
23#[derive(Debug, Display, Clone, Error)]
24#[display("out of memory")]
25pub struct OOMError;
26
27#[derive(Debug, Display, Clone, Error)]
28#[display("exceeded open file limit for process")]
29pub struct FileCountError;
30
31#[derive(Debug, Display, Clone, Error)]
32#[display("exceeded memory for allocating locks")]
33pub struct LockMemError;
34
35#[derive(Debug, Display, Clone, Error)]
36#[display("operating would block but called via non-blocking method")]
37pub struct WouldBlockError;
38
39#[derive(Debug, Display, Clone, Error)]
40#[display("directory no longer exists")]
41pub struct RemovedDirectoryError;
42
43#[derive(Debug, Display, Clone, Error)]
44#[display("search permission is denied for one of the directories in the provided path")]
45pub struct NoSearchError;
46
47#[derive(Debug, Display, Clone, Error)]
48#[display("path contains too many symlinks")]
49pub struct ExcessiveLinksError;
50
51#[derive(Debug, Display, Clone, Error)]
52#[display("path is too long")]
53pub struct PathLengthError;
54
55#[derive(Debug, Display, Clone, Error)]
56#[display("a component of the provide path does not exist")]
57pub struct MissingComponentError;
58
59#[derive(Debug, Display, Clone, Error)]
60#[display("a component of the provide path is not a directory")]
61pub struct NonDirComponentError;
62
63#[derive(Debug, Display, Clone, Error)]
64#[display("provided string is empty")]
65pub struct EmptyStrError;
66
67#[derive(Debug, Display, Clone, Error)]
68#[display("unable to get home directory")]
69pub struct HomeResolutionError;