diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-03-26 19:41:46 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-04-27 16:37:10 +0200 |
commit | b4376108122bb09bd8cff562b718967d4332ffbe (patch) | |
tree | 120910caa43e400c0431463f47ed3fc114af77ea /src/table/crdt | |
parent | f8716895715b1a552750062aca9bc1882f6f95c0 (diff) | |
download | garage-b4376108122bb09bd8cff562b718967d4332ffbe.tar.gz garage-b4376108122bb09bd8cff562b718967d4332ffbe.zip |
attempt at documenting table crate
Diffstat (limited to 'src/table/crdt')
-rw-r--r-- | src/table/crdt/lww.rs | 2 | ||||
-rw-r--r-- | src/table/crdt/map.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/table/crdt/lww.rs b/src/table/crdt/lww.rs index 25ecdb07..3b1b2406 100644 --- a/src/table/crdt/lww.rs +++ b/src/table/crdt/lww.rs @@ -34,7 +34,7 @@ use crate::crdt::crdt::*; /// and may differ from what you observed with your atomic clock! /// /// This scheme is used by AWS S3 or Soundcloud and often without knowing -/// in entreprise when reconciliating databases with ad-hoc scripts. +/// in enterprise when reconciliating databases with ad-hoc scripts. #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct LWW<T> { ts: u64, diff --git a/src/table/crdt/map.rs b/src/table/crdt/map.rs index 1193e6db..c4a30a26 100644 --- a/src/table/crdt/map.rs +++ b/src/table/crdt/map.rs @@ -37,6 +37,7 @@ where Self { vals: vec![(k, v)] } } + /// Add a value to the map pub fn put(&mut self, k: K, v: V) { self.merge(&Self::put_mutator(k, v)); } |