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
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<SystemTime> for Date
impl PartialEq<SystemTime> for Date
sourcefn eq(&self, other: &SystemTime) -> bool
fn eq(&self, other: &SystemTime) -> bool
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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl 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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl 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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moreimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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