pub trait Editor {
// Required methods
fn content(&self) -> &str;
fn cursor(&self) -> usize;
fn set_cursor(&mut self, pos: usize);
fn move_left(&mut self);
fn move_right(&mut self);
fn delete_char_forward(&mut self);
fn insert_text(&mut self, text: &str);
fn replace(&mut self, content: String, cursor: usize);
}Expand description
Minimal text-editor surface required by the Vim engine.