pub enum BufferEdit {
Insert {
byte_offset: usize,
author: ReplicaId,
bytes: Range<usize>,
},
Delete {
byte_ranges: Vec<Range<usize>>,
},
}Expand description
An edit to apply to the text buffer paired with a Replica. Produced by
the integrate_* methods; apply edits in the order given.
Variants§
Insert
Insert the text of the insertion identified by author and bytes at
this visible gap position.
Delete
Remove these visible byte ranges, which are ascending and expressed in pre-deletion coordinates: apply them back to front.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BufferEdit
impl RefUnwindSafe for BufferEdit
impl Send for BufferEdit
impl Sync for BufferEdit
impl Unpin for BufferEdit
impl UnsafeUnpin for BufferEdit
impl UnwindSafe for BufferEdit
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