ubiquisync-core 0.0.3

Core protocol types and sync engine for Ubiquisync — conflict-free sync of structured data over commodity cloud storage or a dedicated server.
Documentation
//! Byte-level wire codec for log segments.
//!
//! A segment is an app-supplied magic header plus a sequence of entries. Each
//! entry is one op (encoded through the [`Op`] trait), a delta-encoded
//! timestamp, an optional user id (server mode), and a truncated blake3
//! integrity check. The magic identifies the application and is supplied by
//! the caller to [`Encoder::new`] / [`Decoder::new`].
//!
//! This module is generic over the op vocabulary `E: Op`: the framing here
//! (header, timestamp deltas, UUID dictionary compression, blake3 trailer,
//! expungement markers) knows nothing about any particular op. Each data
//! domain implements [`Op`] for its own op type — for example the table op
//! vocabulary in `ubiquisync-tables`.

mod consts;
mod decoder;
mod encoder;
mod error;
mod op;
mod reader;
mod writer;

pub use consts::{FLAG_DEVICE, FLAG_SERVER, TAG_EXPUNGED};
pub use decoder::{DecodedEntry, DecodedLogs, Decoder};
pub use encoder::Encoder;
pub use error::CodecError;
pub use op::{IndexableOp, Op, OpIndexEntry};
pub use reader::{EntryBufferReader, Reader};
pub use writer::EntryBufferWriter;