pub enum Weekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday,
}
Expand description
Days of the week.
As order is dependent on context (Sunday could be either two days after or five days before
Friday), this type does not implement PartialOrd
or Ord
.
Variants§
Implementations§
Source§impl Weekday
impl Weekday
Sourcepub const fn number_from_monday(self) -> u8
pub const fn number_from_monday(self) -> u8
Sourcepub const fn number_from_sunday(self) -> u8
pub const fn number_from_sunday(self) -> u8
Sourcepub const fn number_days_from_monday(self) -> u8
pub const fn number_days_from_monday(self) -> u8
Sourcepub const fn number_days_from_sunday(self) -> u8
pub const fn number_days_from_sunday(self) -> u8
Trait Implementations§
Source§impl SmartDisplay for Weekday
impl SmartDisplay for Weekday
Source§fn metadata(&self, _: FormatterOptions) -> Metadata<'_, Self>
fn metadata(&self, _: FormatterOptions) -> Metadata<'_, Self>
Compute any information needed to format the value. This must, at a minimum, determine the
width of the value before any padding is added by the formatter. Read more
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Format the value using the given formatter. This is the same as
Display::fmt
. Read moreSource§fn fmt_with_metadata(
&self,
f: &mut Formatter<'_>,
_metadata: Metadata<'_, Self>,
) -> Result<(), Error>
fn fmt_with_metadata( &self, f: &mut Formatter<'_>, _metadata: Metadata<'_, Self>, ) -> Result<(), Error>
Format the value using the given formatter and metadata. The formatted output should have
the width indicated by the metadata. This is before any padding is added by the
formatter. Read more
impl Copy for Weekday
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)