pub struct DocumentChange<'a> {
pub range: Range,
pub new_text: Cow<'a, str>,
pub old_text: Cow<'a, str>,
pub timestamp: Instant,
pub change_id: u64,
}Available on crate feature
stream only.Expand description
Represents a change to the document with delta tracking
Fields§
§range: RangeThe range that was affected
new_text: Cow<'a, str>The new text that replaced the range
old_text: Cow<'a, str>The old text that was replaced (for undo)
timestamp: InstantAvailable on crate feature
std only.Timestamp when change occurred (for grouping)
change_id: u64Change ID for tracking (monotonic counter)
Trait Implementations§
Source§impl<'a> Clone for DocumentChange<'a>
impl<'a> Clone for DocumentChange<'a>
Source§fn clone(&self) -> DocumentChange<'a>
fn clone(&self) -> DocumentChange<'a>
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 moreSource§impl<'a> Debug for DocumentChange<'a>
impl<'a> Debug for DocumentChange<'a>
Source§impl<'a> PartialEq for DocumentChange<'a>
impl<'a> PartialEq for DocumentChange<'a>
impl<'a> Eq for DocumentChange<'a>
impl<'a> StructuralPartialEq for DocumentChange<'a>
Auto Trait Implementations§
impl<'a> Freeze for DocumentChange<'a>
impl<'a> RefUnwindSafe for DocumentChange<'a>
impl<'a> Send for DocumentChange<'a>
impl<'a> Sync for DocumentChange<'a>
impl<'a> Unpin for DocumentChange<'a>
impl<'a> UnwindSafe for DocumentChange<'a>
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