Skip to main content

capsule_core/metadata/crdt/
mod.rs

1//! CRDT semantics for collaborative metadata (SSoT: [Metadata — Collaborative Metadata]).
2//!
3//! User-editable fields on a shared album (tags, captions, ratings) can be edited
4//! concurrently across devices, including offline. They are modelled as CRDTs so merges are
5//! deterministic and commutative:
6//!
7//! - [`or_set::OrSet`] — tags, with `add_id` binding and reject-unobserved-remove.
8//! - [`lww::Lww`] — single-value registers (caption, rating) with a superseded log.
9//! - [`counter::Counter`] — the per-device monotonic `add_id` counter.
10//!
11//! [Metadata — Collaborative Metadata]: https://docs/design/metadata/#collaborative-metadata
12
13mod counter;
14mod lww;
15mod or_set;
16
17pub use counter::Counter;
18pub use lww::{Lww, SUPERSEDED_CAP, Stamped};
19pub use or_set::{AddId, OrSet, UnobservedRemove};