diff options
| author | Josh Kingsley <josh@joshkingsley.me> | 2025-11-23 16:03:53 +0200 |
|---|---|---|
| committer | Josh Kingsley <josh@joshkingsley.me> | 2025-11-23 16:03:53 +0200 |
| commit | be5cae1beb714680f56d7598b8f5c4816000cb1d (patch) | |
| tree | 7722b7a4970d36420a45a7bc9ab8835cddddf389 /crdt/src/op.rs | |
| parent | 2418583618ece59fd28b5b04bedffccdae11a170 (diff) | |
feat(crdt): re-factor into modules
Diffstat (limited to 'crdt/src/op.rs')
| -rw-r--r-- | crdt/src/op.rs | 21 |
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 {} |
