pub struct UndoEntry {
pub rope: Rope,
pub cursor: (usize, usize),
pub timestamp: SystemTime,
}Expand description
A single entry in the undo or redo stack.
The timestamp records the wall-clock time at which the snapshot was
taken (i.e. when push_undo was called), enabling the :earlier /
:later time-travel ex commands to walk the stack by duration rather
than by step count.
Stored as a ropey::Rope (O(1) Arc-clone) rather than a String so
snapshot cost is negligible even on multi-MB buffers.
Fields§
§rope: Rope§cursor: (usize, usize)§timestamp: SystemTimeAuto Trait Implementations§
impl Freeze for UndoEntry
impl RefUnwindSafe for UndoEntry
impl Send for UndoEntry
impl Sync for UndoEntry
impl Unpin for UndoEntry
impl UnsafeUnpin for UndoEntry
impl UnwindSafe for UndoEntry
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