pub struct UndoNode { /* private fields */ }Expand description
A node in the undo tree.
Each node represents a set of edits made at a point in time, along with cursor positions for proper restoration.
Implementations§
Source§impl UndoNode
impl UndoNode
Sourcepub const fn cursor_before(&self) -> Position
pub const fn cursor_before(&self) -> Position
Get cursor position before edits.
Sourcepub const fn cursor_after(&self) -> Position
pub const fn cursor_after(&self) -> Position
Get cursor position after edits.
Sourcepub const fn branch_count(&self) -> usize
pub const fn branch_count(&self) -> usize
Get number of branches (children) from this node.
Sourcepub const fn origin(&self) -> EditOrigin
pub const fn origin(&self) -> EditOrigin
Get the origin of this edit.
Returns which client made this edit, or EditOrigin::System for
system-generated edits.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UndoNode
impl RefUnwindSafe for UndoNode
impl Send for UndoNode
impl Sync for UndoNode
impl Unpin for UndoNode
impl UnsafeUnpin for UndoNode
impl UnwindSafe for UndoNode
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