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
use failure;
pub type NotificationResult<T> = Result<T, failure::Error>;
#[derive(Debug, Fail)]
pub enum ApplicationError {
#[fail(display = "Application can only be set once.")]
AlreadySet,
#[fail(display = "Could not set application, using default \"com.apple.Termial\"")]
CouldNotSet,
}
#[derive(Debug, Fail)]
pub enum NotificationError {
#[fail(display = "Can not schedule notification in the past")]
ScheduleInThePast,
#[fail(display = "Could not schedule notification")]
UnableToSchedule,
#[fail(display = "Could not deliver notification")]
UnableToDeliver,
}