pub struct ViewVersion(/* private fields */);Expand description
Monotonic version counter for the view-state itself.
Incremented on every ViewState update — even within the same epoch.
Allows consumers to cheaply test staleness: my_version == current.version()
without deep-comparing the full ViewState.
Implementations§
Source§impl ViewVersion
impl ViewVersion
Sourcepub fn versions_since(self, other: Self) -> u64
pub fn versions_since(self, other: Self) -> u64
Number of versions between self and other.
Returns 0 if other >= self.
Trait Implementations§
Source§impl Clone for ViewVersion
impl Clone for ViewVersion
Source§fn clone(&self) -> ViewVersion
fn clone(&self) -> ViewVersion
Returns a duplicate 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 ViewVersion
impl Debug for ViewVersion
Source§impl Default for ViewVersion
impl Default for ViewVersion
Source§fn default() -> ViewVersion
fn default() -> ViewVersion
Returns the “default value” for a type. Read more
Source§impl Display for ViewVersion
impl Display for ViewVersion
Source§impl Hash for ViewVersion
impl Hash for ViewVersion
Source§impl Ord for ViewVersion
impl Ord for ViewVersion
Source§fn cmp(&self, other: &ViewVersion) -> Ordering
fn cmp(&self, other: &ViewVersion) -> 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 ViewVersion
impl PartialEq for ViewVersion
Source§impl PartialOrd for ViewVersion
impl PartialOrd for ViewVersion
impl Copy for ViewVersion
impl Eq for ViewVersion
impl StructuralPartialEq for ViewVersion
Auto Trait Implementations§
impl Freeze for ViewVersion
impl RefUnwindSafe for ViewVersion
impl Send for ViewVersion
impl Sync for ViewVersion
impl Unpin for ViewVersion
impl UnsafeUnpin for ViewVersion
impl UnwindSafe for ViewVersion
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