sl_liner::keymap

Trait KeyMap

Source
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> { ... }
}

Required Methods§

Source

fn handle_key_core<'a>( &mut self, key: Key, editor: &mut Editor<'a>, ) -> Result<()>

Provided Methods§

Source

fn init<'a>(&mut self, _editor: &mut Editor<'a>)

Source

fn handle_key<'a>( &mut self, key: Key, editor: &mut Editor<'a>, handler: &mut dyn Completer, ) -> Result<bool>

Implementors§