pub enum DayClass {
Weekday,
Weekend,
}Expand description
Whether a day is a weekday or a weekend day; baselines are kept per class (spec 3.2 §7.10).
§Example
use adk_eval::ledger::DayClass;
use chrono::NaiveDate;
let saturday = NaiveDate::from_ymd_opt(2026, 10, 24).unwrap();
assert_eq!(DayClass::of(saturday), DayClass::Weekend);Variants§
Implementations§
Trait Implementations§
impl Copy for DayClass
Source§impl<'de> Deserialize<'de> for DayClass
impl<'de> Deserialize<'de> for DayClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DayClass
Source§impl Ord for DayClass
impl Ord for DayClass
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DayClass
impl PartialOrd for DayClass
impl StructuralPartialEq for DayClass
Auto Trait Implementations§
impl Forget for DayClass
impl Freeze for DayClass
impl Move for DayClass
impl RefUnwindSafe for DayClass
impl Send for DayClass
impl Sync for DayClass
impl Unpin for DayClass
impl UnsafeUnpin for DayClass
impl UnwindSafe for DayClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more