pub mod models; mod support; pub mod validation; use std::error::Error; use std::fmt::Display; use chrono::NaiveTime; pub use support::{NoneToken, Token}; const START_OF_DAY: NaiveTime = NaiveTime::from_hms_opt(0, 0, 0).unwrap(); const END_OF_DAY: NaiveTime = NaiveTime::from_hms_opt(23, 59, 59).unwrap(); #[derive(Debug)] pub struct UnsupportedEnumValue { pub value: u8, pub enum_name: &'static str, } impl Display for UnsupportedEnumValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!( f, "unsupported enum value '{}' given for enum '{}'", self.value, self.enum_name ) } } impl Error for UnsupportedEnumValue {}