pub trait ConsoleCodeHighlighting {
// Required methods
fn set_code_highlighting(&mut self, value: Option<CodeHighlighting>);
fn code_highlighting(&self) -> Option<&CodeHighlighting>;
}Expand description
Attach/query a console’s default code highlighter.
A Syntax without a highlighter of its own, and
so Markdown code blocks, highlights with the console’s when it renders;
the console’s theme applies when the Syntax names none. Without one,
the default SyntectHighlighter is
used, as before: upstream has no such setting.
Required Methods§
fn set_code_highlighting(&mut self, value: Option<CodeHighlighting>)
fn code_highlighting(&self) -> Option<&CodeHighlighting>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".