pub trait Highlighter {
// Required method
fn highlight(&self, text: &mut Text);
}Expand description
A transformer that adds style spans to Text (e.g. syntax/number/URL
highlighting). The Rust equivalent of upstream’s Highlighter ABC.
This is the primary plugin seam for the first slice: rich-ext registers
Highlighters onto a Console without the core knowing they exist.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".