pub struct RunTextDiff {
pub remap: Option<RunRemap>,
pub changes: Vec<RunTextChange>,
}Expand description
What an edit did to a node’s text, for moving carets across it (U3-a, U3-a-i): a run remap when the run count changed, then byte changes within runs.
Fields§
§remap: Option<RunRemap>§changes: Vec<RunTextChange>Implementations§
Source§impl RunTextDiff
impl RunTextDiff
pub fn is_empty(&self) -> bool
Sourcepub fn map_cursor(&self, c: TextCursor) -> TextCursor
pub fn map_cursor(&self, c: TextCursor) -> TextCursor
A caret of the old generation in the new one: the remap first, then the byte changes of its (new) run.
Trait Implementations§
Source§impl Clone for RunTextDiff
impl Clone for RunTextDiff
Source§fn clone(&self) -> RunTextDiff
fn clone(&self) -> RunTextDiff
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 RunTextDiff
impl Debug for RunTextDiff
Source§impl Default for RunTextDiff
impl Default for RunTextDiff
Source§fn default() -> RunTextDiff
fn default() -> RunTextDiff
Returns the “default value” for a type. Read more
impl Eq for RunTextDiff
Source§impl PartialEq for RunTextDiff
impl PartialEq for RunTextDiff
impl StructuralPartialEq for RunTextDiff
Auto Trait Implementations§
impl Freeze for RunTextDiff
impl RefUnwindSafe for RunTextDiff
impl Send for RunTextDiff
impl Sync for RunTextDiff
impl Unpin for RunTextDiff
impl UnsafeUnpin for RunTextDiff
impl UnwindSafe for RunTextDiff
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