Struct garage_rpc::layout::UpdateTracker
source · pub struct UpdateTracker(pub BTreeMap<Uuid, u64>);
Expand description
Generic update tracker struct
Tuple Fields§
§0: BTreeMap<Uuid, u64>
Implementations§
source§impl UpdateTracker
impl UpdateTracker
sourcepub fn set_max(&mut self, peer: Uuid, value: u64) -> bool
pub fn set_max(&mut self, peer: Uuid, value: u64) -> bool
This bumps the update tracker for a given node up to the specified value. This has potential impacts on the correctness of Garage and should only be used in very specific circumstances.
pub fn get(&self, node: &Uuid, min_version: u64) -> u64
Trait Implementations§
source§impl Clone for UpdateTracker
impl Clone for UpdateTracker
source§fn clone(&self) -> UpdateTracker
fn clone(&self) -> UpdateTracker
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 UpdateTracker
impl Debug for UpdateTracker
source§impl Default for UpdateTracker
impl Default for UpdateTracker
source§fn default() -> UpdateTracker
fn default() -> UpdateTracker
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for UpdateTracker
impl<'de> Deserialize<'de> for UpdateTracker
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
source§impl PartialEq for UpdateTracker
impl PartialEq for UpdateTracker
source§fn eq(&self, other: &UpdateTracker) -> bool
fn eq(&self, other: &UpdateTracker) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for UpdateTracker
impl Serialize for UpdateTracker
impl StructuralPartialEq for UpdateTracker
Auto Trait Implementations§
impl Freeze for UpdateTracker
impl RefUnwindSafe for UpdateTracker
impl Send for UpdateTracker
impl Sync for UpdateTracker
impl Unpin for UpdateTracker
impl UnwindSafe for UpdateTracker
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