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
use std::io;
pub type FlicResult<T> = Result<T, FlicError>;
quick_error! {
#[derive(Debug)]
pub enum FlicError {
NoGood {
description("No good")
}
BadInput {
description("Bad input")
}
NoFile {
description("File not found")
}
NotARegularFile {
description("Not a regular file")
}
BadMagic {
description("Bad magic")
}
Corrupted {
description("Corrupted")
}
WrongResolution {
description("Wrong resolution")
}
ExceededLimit {
description("Exceeded limit")
}
Io(err: io::Error) {
from()
description(err.description())
display("IO error: {}", err)
cause(err)
}
}
}