[−][src]Struct utsl_hybrid_clocks::Timestamp
A value that represents a logical timestamp.
These allow us to describe at least a partial ordering over events, in the
same style as Lamport Clocks. In summary, if a < b
then we can say that a
logically
happens-before
b
. Because they are scalar values, they can't be used to tell between whether:
a
happenned concurrently withb
, ora
is part ofb
's causal history, or vica-versa.
Fields
time: T
The Wall-clock time as returned by the clock source.
count: u16
A Lamport clock used to disambiguate events that are given the same
Wall-clock time. This is reset whenever time
is incremented.
Implementations
impl Timestamp<WallMST>
[src]
pub fn to_bytes(&self) -> [u8; 8]
[src]
pub fn from_bytes(bytes: [u8; 8]) -> Self
[src]
pub fn to_u64(&self) -> u64
[src]
pub fn from_u64(t: u64) -> Self
[src]
impl<T> Timestamp<T>
[src]
Trait Implementations
impl<T: Clone> Clone for Timestamp<T>
[src]
impl<T: Copy> Copy for Timestamp<T>
[src]
impl<T: Debug> Debug for Timestamp<T>
[src]
impl<T: Display> Display for Timestamp<T>
[src]
impl<T: Eq> Eq for Timestamp<T>
[src]
impl<T: Hash> Hash for Timestamp<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Ord> Ord for Timestamp<T>
[src]
fn cmp(&self, other: &Timestamp<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<Timestamp<T>> for Timestamp<T>
[src]
impl<T: PartialOrd> PartialOrd<Timestamp<T>> for Timestamp<T>
[src]
fn partial_cmp(&self, other: &Timestamp<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Timestamp<T>) -> bool
[src]
fn le(&self, other: &Timestamp<T>) -> bool
[src]
fn gt(&self, other: &Timestamp<T>) -> bool
[src]
fn ge(&self, other: &Timestamp<T>) -> bool
[src]
impl<T> StructuralEq for Timestamp<T>
[src]
impl<T> StructuralPartialEq for Timestamp<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Timestamp<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Timestamp<T> where
T: Send,
T: Send,
impl<T> Sync for Timestamp<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Timestamp<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Timestamp<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,