Skip to main content

ubiquisync_core/sync/
mod.rs

1//! Synchronization traits: the read/write faces of a replica and the cursors
2//! they exchange.
3//!
4//! - [`LogProcessor`] — write side: `apply` an entry at `(peer, index)`.
5//!   Multi-writer, idempotent.
6//! - [`LogSource`] — read side: `read_since` to pull, `cursors` /
7//!   `watch_cursors` to publish progress.
8//!
9//! A store that is both is a [`Replica`] (the SQL oplog). A file log reads any
10//! origin but writes only its own ([`FileLogSink`]), so it's a
11//! [`FileLogReplica`] — the type-level form of "only the originating device
12//! writes its own log". Both faces speak [`PeerCursors`], a per-origin version
13//! vector. The convergence drivers that consume these traits come later.
14
15mod cursors;
16mod error;
17mod file_log;
18mod processor;
19mod replica;
20mod source;
21
22pub use cursors::{CursorStream, CursorsEvent, HasCursors, PeerCursors};
23pub use error::SyncError;
24pub use file_log::{FileLogPuller, FileLogReplica, FileLogSink};
25pub use processor::{Applied, LogProcessor};
26pub use replica::Replica;
27pub use source::LogSource;