pub trait KeyMap {
// Required method
fn handle_key_core<'a>(
&mut self,
key: Key,
editor: &mut Editor<'a>,
) -> Result<()>;
// Provided methods
fn init<'a>(&mut self, _editor: &mut Editor<'a>) { ... }
fn handle_key<'a>(
&mut self,
key: Key,
editor: &mut Editor<'a>,
handler: &mut dyn Completer,
) -> Result<bool> { ... }
}