pub struct DocumentChange {
pub span: ByteSpan,
pub replacement: Vec<u8>,
}Expand description
One edit a client made to a document.
The spans of a batch address the document as it stands before the batch, so a client never has to compensate for its own earlier changes.
Fields§
§span: ByteSpanThe bytes to replace, empty to insert at that offset.
replacement: Vec<u8>The bytes to put there, empty to delete.
Trait Implementations§
Source§impl Clone for DocumentChange
impl Clone for DocumentChange
Source§fn clone(&self) -> DocumentChange
fn clone(&self) -> DocumentChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentChange
impl Debug for DocumentChange
impl Eq for DocumentChange
Source§impl PartialEq for DocumentChange
impl PartialEq for DocumentChange
impl StructuralPartialEq for DocumentChange
Auto Trait Implementations§
impl Freeze for DocumentChange
impl RefUnwindSafe for DocumentChange
impl Send for DocumentChange
impl Sync for DocumentChange
impl Unpin for DocumentChange
impl UnsafeUnpin for DocumentChange
impl UnwindSafe for DocumentChange
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