pub enum Edit {
Insert {
cursor: Cursor,
text: String,
line_num: u32,
index: usize,
mode: Option<InsertMode>,
},
Delete {
anchor: Anchor,
line_num: u32,
index: usize,
old_assertion: Option<String>,
},
}Expand description
A single low-level edit produced by the parser and consumed by the applier.
Variants§
Insert
Insert new text at a cursor position.
Fields
§
mode: Option<InsertMode>Lowering mode for this insert, if any (e.g. SWAP-to-replacement).
Delete
Delete the line at an anchor.
Fields
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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