HolidayType

Enum HolidayType 

Source
pub enum HolidayType {
Show 30 variants All, Default, CountryDefault, Obs, Religious, Defacto, Federal, FederalLocal, FlagDay, HalfDay, Local, Local2, Obs1, Obs2, Obs3, Optional, Weekday, Buddhism, Christian, Hebrew, Hinduism, Muslim, Orthodox, OtherReligion, Seasons, Sport, TZ, UN, World, Fun,
}
Expand description

All valid holiday types.

Variants§

§

All

Combinations of all known types (except fun).

§

Default

Default holiday set: federal, federallocal, obs1, weekday.

§

CountryDefault

Default set depending on country. For most countries, this is the same as default. However, for some countries it makes sense to add further types - this type accounts for this case. Currently this only affects the UK: local holidays are added as well. This is to include days that are only valid in one of the countries - e.g. Jan 2 is a holiday only for Scotland.

§

Obs

Important (obs1), common (obs2) and other observances (obs3).

§

Religious

All religious holidays: buddhism, christian, hebrew, hinduism, muslm, orthodox.

§

Defacto

Some countries (e.g. Sweden) have days which are de facto treated as official holidays, even if there’s no legal regulation.

§

Federal

Federal/national holidays.

§

FederalLocal

Common local holidays.

§

FlagDay

Flag days.

§

HalfDay

Half day holidays (only afternoon off). These days can be half holidays either by law, or being de facto half day holidays (e.g. Sweden).

§

Local

Local holidays.

§

Local2

Local observances.

§

Obs1

Important observances.

§

Obs2

Common observances.

§

Obs3

Other observances.

§

Optional

Optional holiday. Employment and holiday laws in certain countries allow employees to choose a limited number of holidays from a list of holidays. Some employees may choose to take the day off on these days, however, most offices and businesses remain open.

§

Weekday

Normal working days. In some cases, working days are declared non-working days in order to form a longer period of consecutive non-working days. In exchange, weekend days become normal working days.

§

Buddhism

Buddhist holidays.

§

Christian

Christian holidays.

§

Hebrew

Hebrew holidays.

§

Hinduism

Hindu holidays.

§

Muslim

Muslim holidays.

§

Orthodox

Orthodox holidays.

§

OtherReligion

Religious holidays, not covered by other types.

§

Seasons

Seasons (equinoxes and solstices).

§

Sport

Sport events.

§

TZ

Time zone events - daylight savings time start and end.

§

UN

United Nations days.

§

World

Worldwide observances.

§

Fun

Fun, Wacky and Trivial holidays.

Trait Implementations§

Source§

impl Debug for HolidayType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HolidayType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HolidayType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,