pub enum TextOperation {
Insert {
position: usize,
text: String,
},
Delete {
position: usize,
deleted: String,
},
Replace {
position: usize,
deleted: String,
inserted: String,
},
}Expand description
A text operation that can be undone.
Variants§
Insert
Insert text at a position.
Delete
Delete text at a position.
Replace
Replace text (delete + insert).
Implementations§
Source§impl TextOperation
impl TextOperation
Trait Implementations§
Source§impl Clone for TextOperation
impl Clone for TextOperation
Source§fn clone(&self) -> TextOperation
fn clone(&self) -> TextOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextOperation
impl Debug for TextOperation
Source§impl<'de> Deserialize<'de> for TextOperation
impl<'de> Deserialize<'de> for TextOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextOperation
impl PartialEq for TextOperation
Source§impl Serialize for TextOperation
impl Serialize for TextOperation
impl Eq for TextOperation
impl StructuralPartialEq for TextOperation
Auto Trait Implementations§
impl Freeze for TextOperation
impl RefUnwindSafe for TextOperation
impl Send for TextOperation
impl Sync for TextOperation
impl Unpin for TextOperation
impl UnwindSafe for TextOperation
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