pub struct TimestampNs(pub u64);Expand description
Newtype for nanosecond-precision timestamps (monotonic clock).
Tuple Fields§
§0: u64Implementations§
Source§impl TimestampNs
impl TimestampNs
Sourcepub fn saturating_sub(self, other: TimestampNs) -> u64
pub fn saturating_sub(self, other: TimestampNs) -> u64
Returns self - other, clamped to zero on underflow.
Trait Implementations§
Source§impl Clone for TimestampNs
impl Clone for TimestampNs
Source§fn clone(&self) -> TimestampNs
fn clone(&self) -> TimestampNs
Returns a duplicate of the value. Read more
1.0.0 · 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 TimestampNs
impl Debug for TimestampNs
Source§impl Display for TimestampNs
impl Display for TimestampNs
Source§impl From<TimestampNs> for u64
impl From<TimestampNs> for u64
Source§fn from(v: TimestampNs) -> Self
fn from(v: TimestampNs) -> Self
Converts to this type from the input type.
Source§impl From<u64> for TimestampNs
impl From<u64> for TimestampNs
Source§impl Hash for TimestampNs
impl Hash for TimestampNs
Source§impl Ord for TimestampNs
impl Ord for TimestampNs
Source§fn cmp(&self, other: &TimestampNs) -> Ordering
fn cmp(&self, other: &TimestampNs) -> Ordering
1.21.0 · 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 TimestampNs
impl PartialEq for TimestampNs
Source§impl PartialOrd for TimestampNs
impl PartialOrd for TimestampNs
impl Copy for TimestampNs
impl Eq for TimestampNs
impl StructuralPartialEq for TimestampNs
Auto Trait Implementations§
impl Freeze for TimestampNs
impl RefUnwindSafe for TimestampNs
impl Send for TimestampNs
impl Sync for TimestampNs
impl Unpin for TimestampNs
impl UnsafeUnpin for TimestampNs
impl UnwindSafe for TimestampNs
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