Skip to main content

highlight

Function highlight 

Source
pub fn highlight(code: &str, buf: &mut Vec<u8>) -> Result<()>
Expand description

Highlight a Rust code string and write the highlighted output to the buffer. It serves as a wrapper around Highlighter::highlight_rustc_lexer. It is passed to write_anstream_buf in the lib.rs file.