pub enum Weekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday,
}Expand description
A day of the week.
Variants§
Monday
Monday.
Tuesday
Tuesday.
Wednesday
Wednesday.
Thursday
Thursday.
Friday
Friday.
Saturday
Saturday.
Sunday
Sunday.
Implementations§
Source§impl Weekday
impl Weekday
Sourcepub const fn short_name(self) -> &'static str
pub const fn short_name(self) -> &'static str
Returns the three-letter English abbreviation of the weekday.
Sourcepub const fn number_from_monday(self) -> u8
pub const fn number_from_monday(self) -> u8
Returns the ISO day number, Monday = 1 ..= Sunday = 7.
Sourcepub const fn number_from_sunday(self) -> u8
pub const fn number_from_sunday(self) -> u8
Returns the day number with Sunday = 0 ..= Saturday = 6.
Trait Implementations§
impl Copy for Weekday
impl Eq for Weekday
Source§impl Ord for Weekday
impl Ord for Weekday
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Weekday
impl PartialOrd for Weekday
impl StructuralPartialEq for Weekday
Auto Trait Implementations§
impl Freeze for Weekday
impl RefUnwindSafe for Weekday
impl Send for Weekday
impl Sync for Weekday
impl Unpin for Weekday
impl UnsafeUnpin for Weekday
impl UnwindSafe for Weekday
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