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§
Trait Implementations§
source§impl Bake for IsoWeekday
impl Bake for IsoWeekday
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl BakeSize for IsoWeekday
impl BakeSize for IsoWeekday
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
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<IsoWeekday, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IsoWeekday, <__D as Deserializer<'de>>::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) -> 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<C, A, Z> GetField<IsoWeekday> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoWeekday> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> IsoWeekday
fn get_field(&self) -> IsoWeekday
Returns the value of this trait’s field
T
.source§impl<C, A> GetField<IsoWeekday> for Date<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A> GetField<IsoWeekday> for Date<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> IsoWeekday
fn get_field(&self) -> IsoWeekday
Returns the value of this trait’s field
T
.source§impl<C, A> GetField<IsoWeekday> for DateTime<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A> GetField<IsoWeekday> for DateTime<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§fn get_field(&self) -> IsoWeekday
fn get_field(&self) -> IsoWeekday
Returns the value of this trait’s field
T
.source§impl IntoOption<IsoWeekday> for IsoWeekday
impl IntoOption<IsoWeekday> for IsoWeekday
source§fn into_option(self) -> Option<IsoWeekday>
fn into_option(self) -> Option<IsoWeekday>
Return
self
as an Option<T>
source§impl PartialEq for IsoWeekday
impl PartialEq for IsoWeekday
source§impl Serialize for IsoWeekday
impl Serialize for IsoWeekday
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
)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