pub enum Date {
System(SystemTime),
Chrono(ChronoTime),
}
Expand description
Time variants to serialize
Variants
System(SystemTime)
System time
Chrono(ChronoTime)
Chrono time
Trait Implementations
sourceimpl From<&DateTime<Utc>> for Date
impl From<&DateTime<Utc>> for Date
sourcefn from(value: &ChronoTime) -> Self
fn from(value: &ChronoTime) -> Self
Converts to this type from the input type.
sourceimpl From<&SystemTime> for Date
impl From<&SystemTime> for Date
sourcefn from(value: &SystemTime) -> Self
fn from(value: &SystemTime) -> Self
Converts to this type from the input type.
sourceimpl From<DateTime<Utc>> for Date
impl From<DateTime<Utc>> for Date
sourcefn from(value: ChronoTime) -> Self
fn from(value: ChronoTime) -> Self
Converts to this type from the input type.
sourceimpl From<SystemTime> for Date
impl From<SystemTime> for Date
sourcefn from(value: SystemTime) -> Self
fn from(value: SystemTime) -> Self
Converts to this type from the input type.
sourceimpl Ord for Date
impl Ord for Date
sourceimpl PartialEq<SystemTime> for Date
impl PartialEq<SystemTime> for Date
sourceimpl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<DateTime<Utc>> for Date
impl PartialOrd<DateTime<Utc>> for Date
sourcefn partial_cmp(&self, other: &ChronoTime) -> Option<Ordering>
fn partial_cmp(&self, other: &ChronoTime) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<SystemTime> for Date
impl PartialOrd<SystemTime> for Date
sourcefn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Date
impl Eq for Date
Auto Trait Implementations
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more