pub struct LogicalTime(pub u64);Expand description
Monotonic logical time, measured in nanoseconds since an arbitrary epoch.
For SystemClock the epoch is the Unix epoch; for ManualClock it is
whatever the harness defines. Only ordering and differences are meaningful
across clocks of the same kind.
Tuple Fields§
§0: u64Implementations§
Source§impl LogicalTime
impl LogicalTime
Sourcepub const ZERO: LogicalTime
pub const ZERO: LogicalTime
The zero instant.
Sourcepub const fn from_nanos(nanos: u64) -> Self
pub const fn from_nanos(nanos: u64) -> Self
Construct from a raw nanosecond count.
Sourcepub const fn from_millis(millis: u64) -> Self
pub const fn from_millis(millis: u64) -> Self
Construct from a millisecond count (saturating).
Trait Implementations§
Source§impl Clone for LogicalTime
impl Clone for LogicalTime
Source§fn clone(&self) -> LogicalTime
fn clone(&self) -> LogicalTime
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 moreSource§impl Debug for LogicalTime
impl Debug for LogicalTime
Source§impl Default for LogicalTime
impl Default for LogicalTime
Source§fn default() -> LogicalTime
fn default() -> LogicalTime
Returns the “default value” for a type. Read more
Source§impl Hash for LogicalTime
impl Hash for LogicalTime
Source§impl Ord for LogicalTime
impl Ord for LogicalTime
Source§fn cmp(&self, other: &LogicalTime) -> Ordering
fn cmp(&self, other: &LogicalTime) -> 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 LogicalTime
impl PartialEq for LogicalTime
Source§fn eq(&self, other: &LogicalTime) -> bool
fn eq(&self, other: &LogicalTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LogicalTime
impl PartialOrd for LogicalTime
impl Copy for LogicalTime
impl Eq for LogicalTime
impl StructuralPartialEq for LogicalTime
Auto Trait Implementations§
impl Freeze for LogicalTime
impl RefUnwindSafe for LogicalTime
impl Send for LogicalTime
impl Sync for LogicalTime
impl Unpin for LogicalTime
impl UnsafeUnpin for LogicalTime
impl UnwindSafe for LogicalTime
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> 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.