Enum holiday::NthWeekday
source · pub enum NthWeekday {
First,
Second,
Third,
Fourth,
Fifth,
Last,
}
Expand description
The nth ocurrence of a weekday in a month.
Using the Fifth
explicitly may panic if you try
to create a date with it, as some months do not have 5 ocurrences of a given weekday.
Variants§
Trait Implementations§
source§impl Clone for NthWeekday
impl Clone for NthWeekday
source§fn clone(&self) -> NthWeekday
fn clone(&self) -> NthWeekday
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NthWeekday
impl Debug for NthWeekday
source§impl From<NthWeekday> for u32
impl From<NthWeekday> for u32
source§fn from(nth: NthWeekday) -> Self
fn from(nth: NthWeekday) -> Self
Converts to this type from the input type.
source§impl From<u32> for NthWeekday
impl From<u32> for NthWeekday
source§fn from(u: u32) -> NthWeekday
fn from(u: u32) -> NthWeekday
Converts to this type from the input type.
source§impl Ord for NthWeekday
impl Ord for NthWeekday
source§fn cmp(&self, other: &NthWeekday) -> Ordering
fn cmp(&self, other: &NthWeekday) -> Ordering
1.21.0 · 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
source§impl PartialEq<NthWeekday> for NthWeekday
impl PartialEq<NthWeekday> for NthWeekday
source§fn eq(&self, other: &NthWeekday) -> bool
fn eq(&self, other: &NthWeekday) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<u32> for NthWeekday
impl PartialEq<u32> for NthWeekday
source§impl PartialOrd<NthWeekday> for NthWeekday
impl PartialOrd<NthWeekday> for NthWeekday
source§fn partial_cmp(&self, other: &NthWeekday) -> Option<Ordering>
fn partial_cmp(&self, other: &NthWeekday) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more