pub struct EditRecord {
pub op: EditOp,
pub inverse_op: EditOp,
pub revision_before: Revision,
pub revision_after: Revision,
pub selections_before: Vec<Selection>,
pub selections_after: Vec<Selection>,
}Expand description
One atomic edit recorded in an undo group, alongside the inverse op the undo path replays to revert it.
Fields§
§op: EditOpThe op that was applied.
inverse_op: EditOpThe op that, applied to the post-edit rope, restores the pre-edit rope. Computed at record time when both the original removed text and the post-edit positions are still in scope.
revision_before: RevisionBuffer revision before Self::op was applied.
revision_after: RevisionBuffer revision after Self::op was applied.
selections_before: Vec<Selection>Selections at the time of the edit, before mutation.
selections_after: Vec<Selection>Selections after mutation.
Trait Implementations§
Source§impl Clone for EditRecord
impl Clone for EditRecord
Auto Trait Implementations§
impl Forget for EditRecord
impl Freeze for EditRecord
impl Move for EditRecord
impl RefUnwindSafe for EditRecord
impl Send for EditRecord
impl Sync for EditRecord
impl Unpin for EditRecord
impl UnsafeUnpin for EditRecord
impl UnwindSafe for EditRecord
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