libtad_models/holidays/
holiday_state.rs

1use serde::Deserialize;
2
3#[derive(Debug, Deserialize)]
4/// A holiday event in a specific state.
5pub struct HolidayState {
6    /// An ISO 3166-1 country or ISO 3166-2 country state code.
7    ///
8    /// See also: <https://services.timeanddate.com/api/doc/v3/bi01.html#ISO3166>
9    pub iso: String,
10
11    /// Unique id of the state/subdivision.
12    pub id: i32,
13
14    /// Abbreviation of the state/subdivision.
15    pub abbrev: String,
16
17    /// Common name of the state/subdivision.
18    pub name: String,
19
20    /// Eventual exception if the holiday does not affect the whole state/subdivision.
21    pub exception: Option<String>,
22}