pub struct EditResult {
pub edits: Vec<TextEdit>,
pub yanked: Option<String>,
pub action: Option<Action>,
}Expand description
Result of processing a key event.
Fields§
§edits: Vec<TextEdit>Text mutations to apply, in order.
yanked: Option<String>Text that was yanked, if any (host can sync to clipboard).
action: Option<Action>Action requested by the editor.
Implementations§
Source§impl EditResult
impl EditResult
Sourcepub fn cursor_only() -> Self
pub fn cursor_only() -> Self
Create a result with a cursor move (no text change).
Sourcepub fn edit_and_yank(edit: TextEdit, yanked: String) -> Self
pub fn edit_and_yank(edit: TextEdit, yanked: String) -> Self
Create a result with edits and yanked text.
Trait Implementations§
Source§impl Clone for EditResult
impl Clone for EditResult
Source§fn clone(&self) -> EditResult
fn clone(&self) -> EditResult
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 EditResult
impl Debug for EditResult
Source§impl Default for EditResult
impl Default for EditResult
Source§fn default() -> EditResult
fn default() -> EditResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EditResult
impl RefUnwindSafe for EditResult
impl Send for EditResult
impl Sync for EditResult
impl Unpin for EditResult
impl UnwindSafe for EditResult
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