Struct wasmbus_rpc::Timestamp
source · 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: i64
The number of non-leap seconds since UNIX EPOCH in UTC
nsec: u32
The 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 PartialEq<Timestamp> for Timestamp
impl PartialEq<Timestamp> for Timestamp
source§impl PartialOrd<Timestamp> for Timestamp
impl PartialOrd<Timestamp> for Timestamp
1.0.0 · source§fn 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 moresource§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 StructuralEq for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.