pub enum HumanTimestamp {
Micros(Timestamp),
RFC3339(DateTime<Utc>),
}
Expand description
A human-readable timestamp which is represented/serialized as an RFC3339 when possible, and a microsecond integer count otherwise. Both representations can be deserialized to this type.
Variants§
Trait Implementations§
source§impl Clone for HumanTimestamp
impl Clone for HumanTimestamp
source§fn clone(&self) -> HumanTimestamp
fn clone(&self) -> HumanTimestamp
Returns a copy 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 Debug for HumanTimestamp
impl Debug for HumanTimestamp
source§impl<'de> Deserialize<'de> for HumanTimestamp
impl<'de> Deserialize<'de> for HumanTimestamp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&HumanTimestamp> for Timestamp
impl From<&HumanTimestamp> for Timestamp
source§fn from(h: &HumanTimestamp) -> Self
fn from(h: &HumanTimestamp) -> Self
Converts to this type from the input type.
source§impl From<HumanTimestamp> for Timestamp
impl From<HumanTimestamp> for Timestamp
source§fn from(h: HumanTimestamp) -> Self
fn from(h: HumanTimestamp) -> Self
Converts to this type from the input type.
source§impl From<Timestamp> for HumanTimestamp
impl From<Timestamp> for HumanTimestamp
source§impl PartialEq for HumanTimestamp
impl PartialEq for HumanTimestamp
source§impl Serialize for HumanTimestamp
impl Serialize for HumanTimestamp
impl Copy for HumanTimestamp
impl Eq for HumanTimestamp
Auto Trait Implementations§
impl RefUnwindSafe for HumanTimestamp
impl Send for HumanTimestamp
impl Sync for HumanTimestamp
impl Unpin for HumanTimestamp
impl UnwindSafe for HumanTimestamp
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