pub trait Highlight: Write {
Show 15 methods
// Required method
fn highlight(
&mut self,
text: &str,
extension: &str,
theme: Option<&str>,
) -> Result<(), Error>;
// Provided methods
fn highlight_ext(
&mut self,
text: &str,
extension: &str,
) -> Result<(), Error> { ... }
fn highlight_json(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_yaml(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_toml(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_xml(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_html(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_css(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_js(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_rs(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_py(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_rb(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_sh(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_md(&mut self, text: &str) -> Result<(), Error> { ... }
fn highlight_txt(&mut self, text: &str) -> Result<(), Error> { ... }
}Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".