Skip to main content

truth_engine/
error.rs

1//! Error types for truth-engine operations.
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum TruthError {
7    #[error("Invalid RRULE: {0}")]
8    InvalidRule(String),
9
10    #[error("Invalid timezone: {0}")]
11    InvalidTimezone(String),
12
13    #[error("Expansion error: {0}")]
14    Expansion(String),
15
16    #[error("Availability error: {0}")]
17    Availability(String),
18}
19
20pub type Result<T> = std::result::Result<T, TruthError>;