1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#[derive(Debug, Clone, Eq, PartialEq, Fail)]
pub enum ErrorMsg {
#[fail(display = "IO Error")]
IO,
#[fail(display = "Locking error")]
LockError,
#[fail(display = "UTF8 error")]
UTF8Error,
#[fail(display = "Error in external process")]
ExternalProcessError,
#[fail(display = "File Error")]
FileError,
#[fail(display = "File not copied")]
FileNotCopied,
#[fail(display = "File not created")]
FileNotCreated,
#[fail(display = "File not found")]
FileNotFound,
#[fail(display = "Fail not removed")]
FileNotRemoved,
#[fail(display = "Fail not renamed")]
FileNotRenamed,
#[fail(display = "File not seeked")]
FileNotSeeked,
#[fail(display = "File not written")]
FileNotWritten,
#[fail(display = "Directory not created")]
DirNotCreated,
#[fail(display = "Formatting error")]
FormatError,
#[fail(display = "ID is locked")]
IdLocked,
#[fail(display = "Error while converting values")]
ConversionError,
#[fail(display = "Entry exists already: {}", _0)]
EntryAlreadyExists(String),
#[fail(display = "Entry not found: {}", _0)]
EntryNotFound(String),
#[fail(display = "Entry header error")]
EntryHeaderError,
#[fail(display = "Entry header type error")]
EntryHeaderTypeError,
#[fail(display = "Entry header type error at '{}', expected '{}'", _0, _1)]
EntryHeaderTypeError2(&'static str, &'static str),
#[fail(display = "Entry header read error")]
EntryHeaderReadError,
#[fail(display = "Entry header write error")]
EntryHeaderWriteError,
#[fail(display = "Entry header field missing: {}", _0)]
EntryHeaderFieldMissing(&'static str),
#[fail(display = "Toml deserialization error")]
TomlDeserError,
#[fail(display = "Toml querying error")]
TomlQueryError,
}