pub struct UndoEntry {
pub kind: UndoKind,
pub position: usize,
pub removed: String,
pub inserted: String,
pub cursor_before: TextPos,
}Expand description
One reversible delta on a TextBuffer.
Fields§
§kind: UndoKindKind tag (derived from removed / inserted but stored for fast match).
position: usizeByte offset where the edit landed.
removed: StringBytes that the edit displaced (empty for pure insert).
inserted: StringBytes the edit introduced (empty for pure delete).
cursor_before: TextPosCursor head position before the edit.
Trait Implementations§
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.