Skip to main content

CollaborativeDoc

Trait CollaborativeDoc 

Source
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§

Source

fn id(&self) -> &str

Get the document ID.

Source

fn replica_id(&self) -> &str

Get the replica ID.

Source

fn subscribe(&self) -> Receiver<DocEvent>

Subscribe to document events.

Source

fn take_pending_deltas(&mut self) -> Vec<Vec<u8>>

Take pending deltas for sync.

Source

fn apply_remote(&mut self, delta: &[u8])

Apply a remote delta.

Implementors§