pub struct Keymap<A: Clone> { /* private fields */ }Implementations§
Source§impl<A: Clone> Keymap<A>
impl<A: Clone> Keymap<A>
pub fn new() -> Self
pub fn bind(self, key: KeyBinding, action: A, description: &str) -> Self
pub fn register(&mut self, key: KeyBinding, action: A, description: &str)
pub fn unbind(&mut self, key: &KeyBinding)
pub fn resolve(&self, event: &KeyEvent) -> Option<A>
pub fn help(&self) -> Vec<(String, String)>
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Keymap<A>
impl<A> RefUnwindSafe for Keymap<A>where
A: RefUnwindSafe,
impl<A> Send for Keymap<A>where
A: Send,
impl<A> Sync for Keymap<A>where
A: Sync,
impl<A> Unpin for Keymap<A>where
A: Unpin,
impl<A> UnsafeUnpin for Keymap<A>
impl<A> UnwindSafe for Keymap<A>where
A: 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