Skip to main content

SyntaxHighlighter

Trait SyntaxHighlighter 

Source
pub trait SyntaxHighlighter {
    // Required method
    fn highlight(
        &self,
        code: &str,
        language: Option<&str>,
    ) -> Vec<HighlightedLine>;
}
Expand description

syntax highlight interface(§29)。

Required Methods§

Source

fn highlight(&self, code: &str, language: Option<&str>) -> Vec<HighlightedLine>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§