Enum icu_calendar::types::IsoWeekday
source · #[repr(i8)]pub enum IsoWeekday {
Monday = 1,
Tuesday = 2,
Wednesday = 3,
Thursday = 4,
Friday = 5,
Saturday = 6,
Sunday = 7,
}
Expand description
A weekday in a 7-day week, according to ISO-8601.
The discriminant values correspond to ISO-8601 weekday numbers (Monday = 1, Sunday = 7).
§Examples
use icu::calendar::types::IsoWeekday;
assert_eq!(1, IsoWeekday::Monday as usize);
assert_eq!(7, IsoWeekday::Sunday as usize);
Variants§
Implementations§
source§impl IsoWeekday
impl IsoWeekday
source§impl IsoWeekday
impl IsoWeekday
sourcepub(crate) fn next_day(self) -> IsoWeekday
pub(crate) fn next_day(self) -> IsoWeekday
Returns the day after the current day.
Trait Implementations§
source§impl Clone for IsoWeekday
impl Clone for IsoWeekday
source§fn clone(&self) -> IsoWeekday
fn clone(&self) -> IsoWeekday
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 IsoWeekday
impl Debug for IsoWeekday
source§impl From<usize> for IsoWeekday
impl From<usize> for IsoWeekday
source§fn from(input: usize) -> Self
fn from(input: usize) -> Self
Convert from an ISO-8601 weekday number to an IsoWeekday
enum. 0 is automatically converted
to 7 (Sunday). If the number is out of range, it is interpreted modulo 7.
§Examples
use icu::calendar::types::IsoWeekday;
assert_eq!(IsoWeekday::Sunday, IsoWeekday::from(0));
assert_eq!(IsoWeekday::Monday, IsoWeekday::from(1));
assert_eq!(IsoWeekday::Sunday, IsoWeekday::from(7));
assert_eq!(IsoWeekday::Monday, IsoWeekday::from(8));
source§impl PartialEq for IsoWeekday
impl PartialEq for IsoWeekday
impl Copy for IsoWeekday
impl Eq for IsoWeekday
impl StructuralPartialEq for IsoWeekday
Auto Trait Implementations§
impl Freeze for IsoWeekday
impl RefUnwindSafe for IsoWeekday
impl Send for IsoWeekday
impl Sync for IsoWeekday
impl Unpin for IsoWeekday
impl UnwindSafe for IsoWeekday
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
)