aboutsummaryrefslogtreecommitdiff
path: root/src/util/crdt/lww.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-14 13:55:11 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:45:46 +0100
commit5b1117e582db16cc5aa50840a685875cbd5501f4 (patch)
tree06fec47bf56cb08cb51334454dc15f98352c98f2 /src/util/crdt/lww.rs
parent8f6026de5ecd44cbe0fc0bcd47638a1ece860439 (diff)
downloadgarage-5b1117e582db16cc5aa50840a685875cbd5501f4.tar.gz
garage-5b1117e582db16cc5aa50840a685875cbd5501f4.zip
New model for buckets
Diffstat (limited to 'src/util/crdt/lww.rs')
-rw-r--r--src/util/crdt/lww.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs
index 43d13f27..bc686e05 100644
--- a/src/util/crdt/lww.rs
+++ b/src/util/crdt/lww.rs
@@ -82,6 +82,11 @@ where
&self.v
}
+ /// Take the value inside the CRDT (discards the timesamp)
+ pub fn take(self) -> T {
+ self.v
+ }
+
/// Get a mutable reference to the CRDT's value
///
/// This is usefull to mutate the inside value without changing the LWW timestamp.