pub struct Timestamp(/* private fields */);Expand description
A timestamp for operation ordering, relative to an arbitrary epoch.
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn from_millis(ms: u64) -> Self
pub fn from_millis(ms: u64) -> Self
Create a timestamp from milliseconds.
Sourcepub fn as_duration(&self) -> Duration
pub fn as_duration(&self) -> Duration
Get the underlying Duration.
Trait Implementations§
Source§impl Ord for Timestamp
impl Ord for Timestamp
Source§impl PartialOrd for Timestamp
impl PartialOrd 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