pub struct TextUndoOp {
pub index: usize,
pub pre_text: String,
pub post_text: String,
pub pre_selection: Range<usize>,
pub post_selection: Range<usize>,
pub time: Instant,
pub can_merge: bool,
}Expand description
A single atomic text change that can be undone/redone.
Fields§
§index: usizeStart point of the change in the text.
pre_text: StringText that was present before the change (being replaced/deleted).
post_text: StringText that was inserted (replacing pre_text).
pre_selection: Range<usize>Selection before the change.
post_selection: Range<usize>Selection after the change.
time: InstantWhen this change was first committed.
can_merge: boolWhether this change can merge with adjacent operations.
Trait Implementations§
Source§impl Clone for TextUndoOp
impl Clone for TextUndoOp
Auto Trait Implementations§
impl Forget for TextUndoOp
impl Freeze for TextUndoOp
impl Move for TextUndoOp
impl RefUnwindSafe for TextUndoOp
impl Send for TextUndoOpwhere
RawVecInner: Send,
impl Sync for TextUndoOpwhere
RawVecInner: Sync,
impl Unpin for TextUndoOp
impl UnsafeUnpin for TextUndoOp
impl UnwindSafe for TextUndoOpwhere
RawVecInner: UnwindSafe,
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