pub struct Stamp {
pub time: u64,
pub id: u128,
}Expand description
A Zenoh timestamp as the merge compares it (§4.1, Appendix B): its time, an NTP64 value whose unit is 2^−32 s, and the id of the HLC that issued it, a 128-bit value (the issuing session’s zid).
Fields§
§time: u64The NTP64 time.
id: u128The HLC id, as its 128-bit value. Written as lowercase hexadecimal without leading zeros, as zenoh writes an id and a zid.
Implementations§
Trait Implementations§
impl Copy for Stamp
impl Eq for Stamp
Source§impl Ord for Stamp
impl Ord for Stamp
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
zenoh’s Timestamp order (uhlc 0.8): by time; on equal times, by
the id’s 16 bytes little-endian — least significant first —
compared from the first byte. So the least significant byte that
differs decides, and 100 (hex) orders below 2, which their
values would not.
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Stamp
impl PartialOrd for Stamp
impl StructuralPartialEq for Stamp
Auto Trait Implementations§
impl Forget for Stamp
impl Freeze for Stamp
impl Move for Stamp
impl RefUnwindSafe for Stamp
impl Send for Stamp
impl Sync for Stamp
impl Unpin for Stamp
impl UnsafeUnpin for Stamp
impl UnwindSafe for Stamp
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more