pub enum Holiday {
WeekDay(Weekday),
MovableYearlyDay {
month: u32,
day: u32,
first: Option<i32>,
last: Option<i32>,
half_check: Option<HalfCheck>,
},
SingularDay(NaiveDate),
EasterOffset {
offset: i32,
first: Option<i32>,
last: Option<i32>,
},
MonthWeekday {
month: u32,
weekday: Weekday,
nth: NthWeek,
first: Option<i32>,
last: Option<i32>,
half_check: Option<HalfCheck>,
},
}
Expand description
Types of days when US stocks exchanges are closed
Variants§
WeekDay(Weekday)
for US exchanges, Sat
and Sun
MovableYearlyDay
first
and last
are the first and last year this day is a holiday (inclusively).
SingularDay(NaiveDate)
A single holiday which is valid only once in time.
EasterOffset
A holiday that is defined in relative days (e.g. -2 for Good Friday) to Easter (Sunday).
MonthWeekday
A holiday that falls on the nth (or last) weekday of a specific month, e.g. the first Monday in May.
first
and last
are the first and last year this day is a holiday (inclusively).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Holiday
impl<'de> Deserialize<'de> for Holiday
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 StructuralPartialEq for Holiday
Auto Trait Implementations§
impl Freeze for Holiday
impl RefUnwindSafe for Holiday
impl Send for Holiday
impl Sync for Holiday
impl Unpin for Holiday
impl UnwindSafe for Holiday
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