Enum icu_datetime::fields::symbols::Week
source · #[repr(u8)]pub enum Week {
WeekOfYear = 0,
WeekOfMonth = 1,
}
Expand description
An enum for the possible symbols of a week field in a date pattern.
Variants§
WeekOfYear = 0
Field symbol for week of year (numeric).
When used in a pattern with year, use Year::WeekOf
for the year field instead of Year::Calendar
.
This field symbol is represented by the character w
in a date formatting pattern string.
For more details, see documentation on date field symbols.
WeekOfMonth = 1
Field symbol for week of month (numeric).
This field symbol is represented by the character W
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Implementations§
source§impl Week
impl Week
sourcepub(crate) fn new_from_u8(value: u8) -> Option<Self>
pub(crate) fn new_from_u8(value: u8) -> Option<Self>
Attempt to construct the value from its corresponding integer,
returning None
if not possible
Trait Implementations§
source§impl From<Week> for FieldSymbol
impl From<Week> for FieldSymbol
source§impl Ord for Week
impl Ord for Week
source§impl PartialOrd for Week
impl PartialOrd for Week
source§impl<'a> Yokeable<'a> for Weekwhere
Self: Sized,
impl<'a> Yokeable<'a> for Weekwhere
Self: Sized,
source§impl<'a> ZeroMapKV<'a> for Week
impl<'a> ZeroMapKV<'a> for Week
impl Copy for Week
impl Eq for Week
impl StructuralPartialEq for Week
Auto Trait Implementations§
impl Freeze for Week
impl RefUnwindSafe for Week
impl Send for Week
impl Sync for Week
impl Unpin for Week
impl UnwindSafe for Week
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