pub struct VimFallbackHandler;Expand description
Vim-specific fallback handler.
Implements character insertion for Insert mode and beeps for unmatched keys in Normal mode.
§Design Philosophy
This is a policy implementation. The event loop (mechanism) doesn’t know about Insert mode or character insertion - it just delegates to this handler when a key doesn’t match any binding.
§Example
ⓘ
use reovim_module_vim::VimFallbackHandler;
use runner::EventLoop;
let fallback = VimFallbackHandler;
let event_loop = EventLoop::new(app, modes, commands, keymaps, fallback);Trait Implementations§
Source§impl Clone for VimFallbackHandler
impl Clone for VimFallbackHandler
Source§fn clone(&self) -> VimFallbackHandler
fn clone(&self) -> VimFallbackHandler
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 VimFallbackHandler
impl Debug for VimFallbackHandler
Source§impl Default for VimFallbackHandler
impl Default for VimFallbackHandler
Source§fn default() -> VimFallbackHandler
fn default() -> VimFallbackHandler
Returns the “default value” for a type. Read more
Source§impl<C: FallbackContext> InputFallbackHandler<C> for VimFallbackHandler
impl<C: FallbackContext> InputFallbackHandler<C> for VimFallbackHandler
Source§fn handle_unmatched(&self, key: KeyEvent, ctx: &mut C) -> FallbackResult
fn handle_unmatched(&self, key: KeyEvent, ctx: &mut C) -> FallbackResult
Handle a key event that didn’t match any binding. Read more
impl Copy for VimFallbackHandler
Auto Trait Implementations§
impl Freeze for VimFallbackHandler
impl RefUnwindSafe for VimFallbackHandler
impl Send for VimFallbackHandler
impl Sync for VimFallbackHandler
impl Unpin for VimFallbackHandler
impl UnsafeUnpin for VimFallbackHandler
impl UnwindSafe for VimFallbackHandler
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