diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-10 16:21:56 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-10 16:21:56 +0100 |
commit | f319a7d3740ba8b83c9c0eae27edfda1c1d14c03 (patch) | |
tree | efde4606ad33dcf5ad357f82553ad3b07d4a9858 /src/table/schema.rs | |
parent | 6a3dcf39740cda27e61b93582b6fea66991ec4f2 (diff) | |
download | garage-f319a7d3740ba8b83c9c0eae27edfda1c1d14c03.tar.gz garage-f319a7d3740ba8b83c9c0eae27edfda1c1d14c03.zip |
Refactor model stuff, including cleaner CRDTs
Diffstat (limited to 'src/table/schema.rs')
-rw-r--r-- | src/table/schema.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/table/schema.rs b/src/table/schema.rs index edd04000..5b789a02 100644 --- a/src/table/schema.rs +++ b/src/table/schema.rs @@ -2,6 +2,8 @@ use serde::{Deserialize, Serialize}; use garage_util::data::*; +use crate::crdt::CRDT; + pub trait PartitionKey { fn hash(&self) -> Hash; } @@ -35,12 +37,10 @@ impl SortKey for Hash { } pub trait Entry<P: PartitionKey, S: SortKey>: - PartialEq + Clone + Serialize + for<'de> Deserialize<'de> + Send + Sync + CRDT + PartialEq + Clone + Serialize + for<'de> Deserialize<'de> + Send + Sync { fn partition_key(&self) -> &P; fn sort_key(&self) -> &S; - - fn merge(&mut self, other: &Self); } pub trait TableSchema: Send + Sync { |