pub struct CollaborativeUndoManager { /* private fields */ }Expand description
A collaborative undo manager that tracks operations across replicas.
Implementations§
Source§impl CollaborativeUndoManager
impl CollaborativeUndoManager
Sourcepub fn for_document(&mut self, document_id: &str) -> &mut UndoManager
pub fn for_document(&mut self, document_id: &str) -> &mut UndoManager
Get or create an undo manager for a document.
Sourcepub fn record(
&mut self,
document_id: &str,
operation: UndoableOperation,
) -> &Operation
pub fn record( &mut self, document_id: &str, operation: UndoableOperation, ) -> &Operation
Record an operation.
Sourcepub fn record_remote(&mut self, document_id: &str, operation: Operation)
pub fn record_remote(&mut self, document_id: &str, operation: Operation)
Record a remote operation.
Sourcepub fn start_group(&mut self, document_id: &str) -> GroupId
pub fn start_group(&mut self, document_id: &str) -> GroupId
Start a group for a document.
Sourcepub fn undo(&mut self, document_id: &str) -> Vec<UndoableOperation>
pub fn undo(&mut self, document_id: &str) -> Vec<UndoableOperation>
Undo for a document.
Sourcepub fn redo(&mut self, document_id: &str) -> Vec<UndoableOperation>
pub fn redo(&mut self, document_id: &str) -> Vec<UndoableOperation>
Redo for a document.
Sourcepub fn remove_document(&mut self, document_id: &str)
pub fn remove_document(&mut self, document_id: &str)
Remove a document’s undo manager.
Trait Implementations§
Source§impl Clone for CollaborativeUndoManager
impl Clone for CollaborativeUndoManager
Source§fn clone(&self) -> CollaborativeUndoManager
fn clone(&self) -> CollaborativeUndoManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CollaborativeUndoManager
impl RefUnwindSafe for CollaborativeUndoManager
impl Send for CollaborativeUndoManager
impl Sync for CollaborativeUndoManager
impl Unpin for CollaborativeUndoManager
impl UnwindSafe for CollaborativeUndoManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more