pub enum DateTimeOrDate<M = TimeFormat> {
DateTime(DateTime<M>),
Date(Date),
}Expand description
Either a full datetime or a date-only value.
Variants§
Implementations§
Source§impl<M> DateTimeOrDate<M>
impl<M> DateTimeOrDate<M>
Sourcepub fn is_date_time(&self) -> bool
pub fn is_date_time(&self) -> bool
Returns true if this is a full datetime value.
Sourcepub fn map_marker<N>(self, f: impl FnOnce(M) -> N) -> DateTimeOrDate<N>
pub fn map_marker<N>(self, f: impl FnOnce(M) -> N) -> DateTimeOrDate<N>
Converts the marker type of the inner datetime.
Trait Implementations§
Source§impl<M: Clone> Clone for DateTimeOrDate<M>
impl<M: Clone> Clone for DateTimeOrDate<M>
Source§fn clone(&self) -> DateTimeOrDate<M>
fn clone(&self) -> DateTimeOrDate<M>
Returns a duplicate 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<M: Debug> Debug for DateTimeOrDate<M>
impl<M: Debug> Debug for DateTimeOrDate<M>
Source§impl<M: PartialEq> PartialEq for DateTimeOrDate<M>
impl<M: PartialEq> PartialEq for DateTimeOrDate<M>
impl<M: Copy> Copy for DateTimeOrDate<M>
impl<M: Eq> Eq for DateTimeOrDate<M>
impl<M> StructuralPartialEq for DateTimeOrDate<M>
Auto Trait Implementations§
impl<M> Freeze for DateTimeOrDate<M>where
M: Freeze,
impl<M> RefUnwindSafe for DateTimeOrDate<M>where
M: RefUnwindSafe,
impl<M> Send for DateTimeOrDate<M>where
M: Send,
impl<M> Sync for DateTimeOrDate<M>where
M: Sync,
impl<M> Unpin for DateTimeOrDate<M>where
M: Unpin,
impl<M> UnsafeUnpin for DateTimeOrDate<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for DateTimeOrDate<M>where
M: 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