pub struct KeyDispatcher { /* private fields */ }
Expand description
Simple key dispatcher that maps keys to action names
Implementations§
Source§impl KeyDispatcher
impl KeyDispatcher
pub fn new() -> Self
Sourcepub fn get_command_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_command_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in command mode
Sourcepub fn get_results_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_results_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in results mode
Sourcepub fn get_search_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_search_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in search mode
Sourcepub fn get_filter_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_filter_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in filter mode
Sourcepub fn get_help_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_help_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in help mode
Sourcepub fn get_debug_action(&self, key: &KeyEvent) -> Option<&str>
pub fn get_debug_action(&self, key: &KeyEvent) -> Option<&str>
Get action for a key in debug mode
Trait Implementations§
Source§impl Clone for KeyDispatcher
impl Clone for KeyDispatcher
Source§fn clone(&self) -> KeyDispatcher
fn clone(&self) -> KeyDispatcher
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 moreAuto Trait Implementations§
impl Freeze for KeyDispatcher
impl RefUnwindSafe for KeyDispatcher
impl Send for KeyDispatcher
impl Sync for KeyDispatcher
impl Unpin for KeyDispatcher
impl UnwindSafe for KeyDispatcher
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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