pub trait CollaborativeDoc {
// Required methods
fn id(&self) -> &str;
fn replica_id(&self) -> &str;
fn subscribe(&self) -> Receiver<DocEvent>;
fn take_pending_deltas(&mut self) -> Vec<Vec<u8>>;
fn apply_remote(&mut self, delta: &[u8]);
}Expand description
Trait for collaborative documents.
Required Methods§
Sourcefn replica_id(&self) -> &str
fn replica_id(&self) -> &str
Get the replica ID.
Sourcefn take_pending_deltas(&mut self) -> Vec<Vec<u8>>
fn take_pending_deltas(&mut self) -> Vec<Vec<u8>>
Take pending deltas for sync.
Sourcefn apply_remote(&mut self, delta: &[u8])
fn apply_remote(&mut self, delta: &[u8])
Apply a remote delta.