pub enum EditorAction {
Handled,
Unhandled(KeyEvent),
Save,
Close,
ForceClose,
SaveAndClose,
}Expand description
Actions returned from VimEditor::handle_key() to inform the parent application.
Variants§
Handled
The editor consumed the key — no further action needed.
Unhandled(KeyEvent)
The editor does not handle this key — bubble up to the parent.
Save
Save buffer (:w or Ctrl+S).
Close
Close buffer (:q).
ForceClose
Force close without saving (:q!).
SaveAndClose
Save and close (:wq, :x).
Auto Trait Implementations§
impl Freeze for EditorAction
impl RefUnwindSafe for EditorAction
impl Send for EditorAction
impl Sync for EditorAction
impl Unpin for EditorAction
impl UnsafeUnpin for EditorAction
impl UnwindSafe for EditorAction
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more