bayer/errcode.rs
1//! Bayer error codes.
2
3use std::io;
4
5pub type BayerResult<T> = Result<T, BayerError>;
6
7quick_error! {
8
9#[derive(Debug)]
10pub enum BayerError {
11 // Generic failure. Please try to make something more meaningful.
12 NoGood {
13 description("No good")
14 }
15
16 WrongResolution {
17 description("Wrong resolution")
18 }
19 WrongDepth {
20 description("Wrong depth")
21 }
22
23 Io(err: io::Error) {
24 from()
25 description(err.description())
26 display("IO error: {}", err)
27 cause(err)
28 }
29}
30
31}