Enum holiday::NthWeekday
source · pub enum NthWeekday {
First = 1,
Second = 2,
Third = 3,
Fourth = 4,
Fifth = 5,
Last = 6,
}
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<u32> for NthWeekday
impl PartialEq<u32> for NthWeekday
source§impl PartialEq for NthWeekday
impl PartialEq 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 PartialOrd for NthWeekday
impl PartialOrd 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 moreimpl Copy for NthWeekday
impl Eq for NthWeekday
impl StructuralPartialEq for NthWeekday
Auto Trait Implementations§
impl Freeze for NthWeekday
impl RefUnwindSafe for NthWeekday
impl Send for NthWeekday
impl Sync for NthWeekday
impl Unpin for NthWeekday
impl UnwindSafe for NthWeekday
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