pub struct HLTimespec { /* private fields */ }
Expand description
The HLTimespec
type stores a hybrid logical timestamp (also called
timespec for symmetry with time::Timespec).
Such a timestamp is comprised of an “ordinary” wall time and a logical component. Timestamps are compared by wall time first, logical second.
§Examples
use hlc::HLTimespec;
let early = HLTimespec::new(1, 0, 0);
let middle = HLTimespec::new(1, 1, 0);
let late = HLTimespec::new(1, 1, 1);
assert!(early < middle && middle < late);
Implementations§
Source§impl HLTimespec
impl HLTimespec
Trait Implementations§
Source§impl Clone for HLTimespec
impl Clone for HLTimespec
Source§fn clone(&self) -> HLTimespec
fn clone(&self) -> HLTimespec
Returns a copy 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 HLTimespec
impl Debug for HLTimespec
Source§impl Display for HLTimespec
impl Display for HLTimespec
Source§impl Ord for HLTimespec
impl Ord for HLTimespec
Source§fn cmp(&self, other: &HLTimespec) -> Ordering
fn cmp(&self, other: &HLTimespec) -> 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 HLTimespec
impl PartialEq for HLTimespec
Source§impl PartialOrd for HLTimespec
impl PartialOrd for HLTimespec
impl Copy for HLTimespec
impl Eq for HLTimespec
impl StructuralPartialEq for HLTimespec
Auto Trait Implementations§
impl Freeze for HLTimespec
impl RefUnwindSafe for HLTimespec
impl Send for HLTimespec
impl Sync for HLTimespec
impl Unpin for HLTimespec
impl UnwindSafe for HLTimespec
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)