#[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§
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<'de> Deserialize<'de> for IsoWeekday
impl<'de> Deserialize<'de> for IsoWeekday
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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