pub struct WallMicros(pub i64);Expand description
A wall-clock instant, in microseconds since the Unix epoch.
This is a coordinate on the time line and not an extent of time, so it is a
newtype here and not a [krabka_units::Time]. See the code style guide’s
“Dimensioned Values” section for the rule.
The unit is the microsecond. A Kafka record timestamp counts milliseconds, and one millisecond is too coarse to order the records inside one batch. A microsecond gives the logical counter far fewer events to separate.
The value is signed, and a value below zero names an instant before the Unix epoch. The clock accepts such a value and does not treat it as an error, because a host whose clock is unset reports one.
Tuple Fields§
§0: i64Implementations§
Trait Implementations§
Source§impl Clone for WallMicros
impl Clone for WallMicros
Source§fn clone(&self) -> WallMicros
fn clone(&self) -> WallMicros
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 WallMicros
Source§impl Debug for WallMicros
impl Debug for WallMicros
Source§impl Default for WallMicros
impl Default for WallMicros
Source§fn default() -> WallMicros
fn default() -> WallMicros
Returns the “default value” for a type. Read more
Source§impl Display for WallMicros
impl Display for WallMicros
impl Eq for WallMicros
Source§impl From<WallMicros> for i64
impl From<WallMicros> for i64
Source§fn from(value: WallMicros) -> Self
fn from(value: WallMicros) -> Self
Converts to this type from the input type.
Source§impl From<i64> for WallMicros
impl From<i64> for WallMicros
Source§impl Hash for WallMicros
impl Hash for WallMicros
Source§impl Ord for WallMicros
impl Ord for WallMicros
Source§fn cmp(&self, other: &WallMicros) -> Ordering
fn cmp(&self, other: &WallMicros) -> 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 WallMicros
impl PartialEq for WallMicros
Source§fn eq(&self, other: &WallMicros) -> bool
fn eq(&self, other: &WallMicros) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for WallMicros
impl PartialOrd for WallMicros
impl StructuralPartialEq for WallMicros
Auto Trait Implementations§
impl Freeze for WallMicros
impl RefUnwindSafe for WallMicros
impl Send for WallMicros
impl Sync for WallMicros
impl Unpin for WallMicros
impl UnsafeUnpin for WallMicros
impl UnwindSafe for WallMicros
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