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
use sysfs_pwm;
use diesel;
error_chain! {
types {
Error, ErrorKind, ResultExt, Result;
}
links {}
foreign_links {
PwmError(sysfs_pwm::Error) #[doc = "PwmError"];
DatabaseError(diesel::result::Error);
}
errors {
TargetFlowRateOutOfRange {
description("The target flow rate is out of range")
display("The target flow rate is out of range.")
}
NotEnoughLiquid(level: f64) {
description("There is not enough liquid in the current dispense")
display("There is currently {} mL left in the dispenser, this is not enough.", level)
}
}
}