Skip to main content

Module crdt_adapter

Module crdt_adapter 

Source
Expand description

CRDT Document Adapter

Trait and types for pluggable CRDT document backends that store binary updates for collaborative documents using Yjs/yrs (Rust port of Yjs).

The adapter handles:

  • Persistence of binary CRDT updates (Yjs sync protocol format)
  • Change subscriptions for real-time updates
  • Document lifecycle (creation, deletion)

Each adapter implementation provides its own constructor handling backend-specific initialization (database path, connection settings, etc.).

The adapter works with binary updates (Uint8Array) rather than typed documents, allowing flexibility in how updates are stored and reconstructed into Y.Doc instances.

Structs§

CrdtChangeEvent
Real-time change notification for a CRDT document.
CrdtDocStats
CRDT Document statistics.
CrdtSubscriptionOptions
Options for subscribing to CRDT document changes.
CrdtUpdate
A binary CRDT update (serialized Yjs sync protocol message).

Traits§

CrdtAdapter
CRDT Adapter trait.