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
Source§fn clone(&self) -> TextUndoOp
fn clone(&self) -> TextUndoOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextUndoOp
impl RefUnwindSafe for TextUndoOp
impl Send for TextUndoOp
impl Sync for TextUndoOp
impl Unpin for TextUndoOp
impl UnsafeUnpin for TextUndoOp
impl UnwindSafe for TextUndoOp
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