pub struct KeybindHandler { /* private fields */ }
Expand description
Key binding handler for mapping keys to actions
Implementations§
Source§impl KeybindHandler
impl KeybindHandler
Sourcepub fn set_leader_key(&mut self, key: String)
pub fn set_leader_key(&mut self, key: String)
Set the leader key
Sourcepub fn handle_key(&mut self, key: &KeyEvent) -> Option<String>
pub fn handle_key(&mut self, key: &KeyEvent) -> Option<String>
Handle a key event and return the bound action if any
Trait Implementations§
Source§impl Clone for KeybindHandler
impl Clone for KeybindHandler
Source§fn clone(&self) -> KeybindHandler
fn clone(&self) -> KeybindHandler
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 KeybindHandler
impl Debug for KeybindHandler
Auto Trait Implementations§
impl Freeze for KeybindHandler
impl RefUnwindSafe for KeybindHandler
impl Send for KeybindHandler
impl Sync for KeybindHandler
impl Unpin for KeybindHandler
impl UnwindSafe for KeybindHandler
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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