Enum icu_datetime::input::IsoWeekday
source · #[repr(i8)]pub(crate) 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§
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) -> IsoWeekday
fn from(input: usize) -> IsoWeekday
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
source§fn eq(&self, other: &IsoWeekday) -> bool
fn eq(&self, other: &IsoWeekday) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more