pub struct TimeStamp { /* private fields */ }Expand description
An UNIX time stamp.
These should only ever be used for human-display, because timestamps are
unreliably in a distributed system.
Because of this reason, there is no value() function.
Implementations§
Source§impl TimeStamp
impl TimeStamp
Sourcepub unsafe fn to_unsafe(self) -> UnsafeTimeStamp
pub unsafe fn to_unsafe(self) -> UnsafeTimeStamp
Turn this time stamp into one that exposes it’s numerical value.
§Safety
This is not really unsafe, but there is just no way your can trust a time stamp in a distributed system. As such access to the raw value could lead to bugs.
Trait 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
impl Copy 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