pub struct KeyBindingMap<C> { /* private fields */ }
Implementations§
Source§impl<C> KeyBindingMap<C>
impl<C> KeyBindingMap<C>
pub fn new() -> Self
pub fn command_for(&self, key: impl Into<KeyEvent>) -> Option<&C>
pub fn with(self, key: impl Into<KeyEvent>, command: impl Into<C>) -> Self
pub fn bind( &mut self, key: impl Into<KeyEvent>, command: impl Into<C>, ) -> Option<C>
pub fn unbind(&mut self, key: impl Into<KeyEvent>) -> Option<C>
Trait Implementations§
Source§impl<C: Clone> Clone for KeyBindingMap<C>
impl<C: Clone> Clone for KeyBindingMap<C>
Source§fn clone(&self) -> KeyBindingMap<C>
fn clone(&self) -> KeyBindingMap<C>
Returns a copy 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<C: Debug> Debug for KeyBindingMap<C>
impl<C: Debug> Debug for KeyBindingMap<C>
Auto Trait Implementations§
impl<C> Freeze for KeyBindingMap<C>
impl<C> RefUnwindSafe for KeyBindingMap<C>where
C: RefUnwindSafe,
impl<C> Send for KeyBindingMap<C>where
C: Send,
impl<C> Sync for KeyBindingMap<C>where
C: Sync,
impl<C> Unpin for KeyBindingMap<C>where
C: Unpin,
impl<C> UnwindSafe for KeyBindingMap<C>where
C: UnwindSafe,
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