1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, EventixError>;
7
8#[derive(Error, Debug)]
10pub enum EventixError {
11 #[error("Failed to parse date/time: {0}")]
13 DateTimeParse(String),
14
15 #[error("Invalid timezone: {0}")]
17 InvalidTimezone(String),
18
19 #[error("Recurrence error: {0}")]
21 RecurrenceError(String),
22
23 #[error("ICS error: {0}")]
25 IcsError(String),
26
27 #[error("Event validation error: {0}")]
29 ValidationError(String),
30
31 #[error("IO error: {0}")]
33 IoError(#[from] std::io::Error),
34
35 #[error("{0}")]
37 Other(String),
38}