Enum temporal_rs::components::calendar::CalendarDateLike
source · pub enum CalendarDateLike<C: CalendarProtocol> {
CustomDate(C::Date),
CustomDateTime(C::DateTime),
CustomYearMonth(C::YearMonth),
CustomMonthDay(C::MonthDay),
DateTime(DateTime<C>),
Date(Date<C>),
}
Expand description
The DateLike
objects that can be provided to the CalendarProtocol
.
Variants§
CustomDate(C::Date)
Represents a user-defined Date
datelike
CustomDateTime(C::DateTime)
Represents a user-defined DateTime
datelike
CustomYearMonth(C::YearMonth)
Represents a user-defined YearMonth
datelike
CustomMonthDay(C::MonthDay)
Represents a user-defined MonthDay
datelike
DateTime(DateTime<C>)
Represents a DateTime<C>
.
Date(Date<C>)
Represents a Date<C>
.
Implementations§
source§impl<C: CalendarProtocol> CalendarDateLike<C>
impl<C: CalendarProtocol> CalendarDateLike<C>
sourcepub fn as_iso_date(&self) -> IsoDate
pub fn as_iso_date(&self) -> IsoDate
Retrieves the internal IsoDate
field.
Trait Implementations§
Auto Trait Implementations§
impl<C> RefUnwindSafe for CalendarDateLike<C>where
C: RefUnwindSafe,
<C as CalendarProtocol>::Date: RefUnwindSafe,
<C as CalendarProtocol>::DateTime: RefUnwindSafe,
<C as CalendarProtocol>::MonthDay: RefUnwindSafe,
<C as CalendarProtocol>::YearMonth: RefUnwindSafe,
impl<C> !Send for CalendarDateLike<C>
impl<C> !Sync for CalendarDateLike<C>
impl<C> Unpin for CalendarDateLike<C>where
C: Unpin,
<C as CalendarProtocol>::Date: Unpin,
<C as CalendarProtocol>::DateTime: Unpin,
<C as CalendarProtocol>::MonthDay: Unpin,
<C as CalendarProtocol>::YearMonth: Unpin,
impl<C> UnwindSafe for CalendarDateLike<C>where
C: UnwindSafe,
<C as CalendarProtocol>::Date: UnwindSafe,
<C as CalendarProtocol>::DateTime: UnwindSafe,
<C as CalendarProtocol>::MonthDay: UnwindSafe,
<C as CalendarProtocol>::YearMonth: UnwindSafe,
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