Skip to main content

KeyMap

Trait KeyMap 

Source
pub trait KeyMap<B: Backend + 'static> {
    const KEYBINDS: &'static [KeyBind<B>];

    // Required method
    fn handle(&mut self, event: &B::Event) -> bool;
}
Expand description

A mapping between keybinds and methods on the type which mutate the state

Required Associated Constants§

Source

const KEYBINDS: &'static [KeyBind<B>]

Metadata about the key presses which are handled

Required Methods§

Source

fn handle(&mut self, event: &B::Event) -> bool

Handle an event by calling the appropriate handler method

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§