pub struct WallTimestamp(/* private fields */);Expand description
One observed host wall-clock instant, represented as milliseconds since the Unix epoch.
A wall timestamp is human-facing evidence and a scheduling input. It is not
monotonic: callers must use logical ticks, revisions, or std::time::Instant
when correctness depends on ordering or elapsed time.
Implementations§
Source§impl WallTimestamp
impl WallTimestamp
Sourcepub const fn from_unix_millis(unix_millis: u64) -> Self
pub const fn from_unix_millis(unix_millis: u64) -> Self
Creates an explicit Unix-millisecond wall-clock observation.
Sourcepub const fn unix_millis(self) -> u64
pub const fn unix_millis(self) -> u64
Returns the observed Unix milliseconds.
Sourcepub fn from_system_time(time: SystemTime) -> Result<Self>
pub fn from_system_time(time: SystemTime) -> Result<Self>
Converts a system wall-clock reading, rejecting pre-epoch and unrepresentable values.
Trait Implementations§
Source§impl Clone for WallTimestamp
impl Clone for WallTimestamp
Source§fn clone(&self) -> WallTimestamp
fn clone(&self) -> WallTimestamp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WallTimestamp
Source§impl Debug for WallTimestamp
impl Debug for WallTimestamp
impl Eq for WallTimestamp
Source§impl Hash for WallTimestamp
impl Hash for WallTimestamp
Source§impl Ord for WallTimestamp
impl Ord for WallTimestamp
Source§fn cmp(&self, other: &WallTimestamp) -> Ordering
fn cmp(&self, other: &WallTimestamp) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WallTimestamp
impl PartialEq for WallTimestamp
Source§impl PartialOrd for WallTimestamp
impl PartialOrd for WallTimestamp
impl StructuralPartialEq for WallTimestamp
Auto Trait Implementations§
impl Freeze for WallTimestamp
impl RefUnwindSafe for WallTimestamp
impl Send for WallTimestamp
impl Sync for WallTimestamp
impl Unpin for WallTimestamp
impl UnsafeUnpin for WallTimestamp
impl UnwindSafe for WallTimestamp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.