summaryrefslogtreecommitdiff
path: root/crdt/src/op.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crdt/src/op.rs')
-rw-r--r--crdt/src/op.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crdt/src/op.rs b/crdt/src/op.rs
new file mode 100644
index 0000000..8f5f8b5
--- /dev/null
+++ b/crdt/src/op.rs
@@ -0,0 +1,21 @@
+use uuid::Uuid;
+
+use crate::vector_clock::VectorClock;
+
+pub struct Op {
+ pub(crate) id: Uuid,
+ pub(crate) clock: VectorClock,
+ pub(crate) kind: OpKind,
+}
+
+pub enum OpKind {
+ CreateGrid(CreateGrid),
+ ChangeSubdivisions(ChangeSubdivisions),
+}
+
+pub struct CreateGrid {
+ pub(crate) rows: usize,
+ pub(crate) base_cells_per_row: usize,
+}
+
+pub struct ChangeSubdivisions {}