pub struct Timestamp {
pub sec: i64,
pub nsec: u32,
}Expand description
Timestamp - represents absolute time in UTC,
as non-leap seconds and nanoseconds since the UNIX EPOCH
It is recommended to use the new constructor to check parameters for validity
Fields§
§sec: i64The number of non-leap seconds since UNIX EPOCH in UTC
nsec: u32The number of nanoseconds since the beginning of the last whole non-leap second
Implementations§
Trait Implementations§
Source§impl Default for Timestamp
impl Default for Timestamp
Source§fn default() -> Timestamp
fn default() -> Timestamp
constructs a time stamp from the current system time UTC See SystemTime for platform implementations
Source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
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<OffsetDateTime> for Timestamp
impl From<OffsetDateTime> for Timestamp
Source§fn from(dt: OffsetDateTime) -> Timestamp
fn from(dt: OffsetDateTime) -> Timestamp
Creates a Timestamp from chrono DateTime
Source§impl From<SystemTime> for Timestamp
impl From<SystemTime> for Timestamp
Source§fn from(st: SystemTime) -> Timestamp
fn from(st: SystemTime) -> Timestamp
Creates a Timestamp from rust’s SystemTime
Source§impl Ord for Timestamp
impl Ord for Timestamp
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
Source§impl TryFrom<Timestamp> for OffsetDateTime
impl TryFrom<Timestamp> for OffsetDateTime
Source§impl TryInto<SystemTime> for Timestamp
impl TryInto<SystemTime> for Timestamp
impl Copy for Timestamp
impl Eq for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.