Enum icu_calendar::week::RelativeUnit
source · pub enum RelativeUnit {
Previous,
Current,
Next,
}
Expand description
The year or month that a calendar assigns a week to relative to the year/month that it is in.
Variants§
Previous
A week that is assigned to previous year/month. e.g. 2021-01-01 is week 54 of 2020 per the ISO calendar.
Current
A week that’s assigned to the current year/month. e.g. 2021-01-11 is week 2 of 2021 per the ISO calendar.
Next
A week that is assigned to the next year/month. e.g. 2019-12-31 is week 1 of 2020 per the ISO calendar.
Trait Implementations§
source§impl Debug for RelativeUnit
impl Debug for RelativeUnit
source§impl PartialEq for RelativeUnit
impl PartialEq for RelativeUnit
impl StructuralPartialEq for RelativeUnit
Auto Trait Implementations§
impl Freeze for RelativeUnit
impl RefUnwindSafe for RelativeUnit
impl Send for RelativeUnit
impl Sync for RelativeUnit
impl Unpin for RelativeUnit
impl UnwindSafe for RelativeUnit
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