pub struct VersionStamp {
pub version: ValueVersion,
pub epoch: ClusterEpoch,
pub hlc: HybridLogicalClock,
}Expand description
Version stamp used by session watermarks.
Fields§
§version: ValueVersionMonotonic value version.
epoch: ClusterEpochAuthority epoch.
hlc: HybridLogicalClockHybrid logical timestamp.
Implementations§
Source§impl VersionStamp
impl VersionStamp
Sourcepub const fn new(
version: ValueVersion,
epoch: ClusterEpoch,
hlc: HybridLogicalClock,
) -> Self
pub const fn new( version: ValueVersion, epoch: ClusterEpoch, hlc: HybridLogicalClock, ) -> Self
Create a stamp.
Sourcepub fn version_distance_from(self, candidate: Self) -> u64
pub fn version_distance_from(self, candidate: Self) -> u64
Conservative version-distance used by bounded staleness.
Trait Implementations§
Source§impl Clone for VersionStamp
impl Clone for VersionStamp
Source§fn clone(&self) -> VersionStamp
fn clone(&self) -> VersionStamp
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 VersionStamp
Source§impl Debug for VersionStamp
impl Debug for VersionStamp
Source§impl Default for VersionStamp
impl Default for VersionStamp
Source§impl<'de> Deserialize<'de> for VersionStamp
impl<'de> Deserialize<'de> for VersionStamp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VersionStamp
Source§impl Hash for VersionStamp
impl Hash for VersionStamp
Source§impl Ord for VersionStamp
impl Ord for VersionStamp
Source§fn cmp(&self, other: &VersionStamp) -> Ordering
fn cmp(&self, other: &VersionStamp) -> 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 VersionStamp
impl PartialEq for VersionStamp
Source§fn eq(&self, other: &VersionStamp) -> bool
fn eq(&self, other: &VersionStamp) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for VersionStamp
impl PartialOrd for VersionStamp
Source§impl Serialize for VersionStamp
impl Serialize for VersionStamp
impl StructuralPartialEq for VersionStamp
Auto Trait Implementations§
impl Freeze for VersionStamp
impl RefUnwindSafe for VersionStamp
impl Send for VersionStamp
impl Sync for VersionStamp
impl Unpin for VersionStamp
impl UnsafeUnpin for VersionStamp
impl UnwindSafe for VersionStamp
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.