pub type Highlighter = Rc<dyn Fn(&str) -> Vec<TextRun>>;
What TextEditor::highlight takes: text in, runs over every byte of it out.
TextEditor::highlight
pub struct Highlighter { /* private fields */ }