rustyline::line_buffer

Trait ChangeListener

Source
pub trait ChangeListener: DeleteListener {
    // Required methods
    fn insert_char(&mut self, idx: usize, c: char);
    fn insert_str(&mut self, idx: usize, string: &str);
    fn replace(&mut self, idx: usize, old: &str, new: &str);
}
Expand description

Listener to be notified when the line is modified.

Required Methods§

Source

fn insert_char(&mut self, idx: usize, c: char)

char inserted at idx index

Source

fn insert_str(&mut self, idx: usize, string: &str)

string inserted at idx index

Source

fn replace(&mut self, idx: usize, old: &str, new: &str)

old text replaced by new text at idx index

Implementors§