pub struct Builtin;Expand description
The built-in lexers as a Highlighter.
Trait Implementations§
impl Copy for Builtin
Source§impl Highlighter for Builtin
impl Highlighter for Builtin
Source§fn supports(&self, lang: &str) -> bool
fn supports(&self, lang: &str) -> bool
Whether this engine highlights
lang (a name, alias or extension).Source§fn highlight_line(
&self,
lang: &str,
line: &str,
state: State,
out: &mut Vec<Span>,
) -> State
fn highlight_line( &self, lang: &str, line: &str, state: State, out: &mut Vec<Span>, ) -> State
Highlights one line starting in
state, appending line-relative spans to out, and
returns the state the next line starts in. Spans must follow the rules of Span; an
engine without line states may return state unchanged.Auto Trait Implementations§
impl Forget for Builtin
impl Freeze for Builtin
impl Move for Builtin
impl RefUnwindSafe for Builtin
impl Send for Builtin
impl Sync for Builtin
impl Unpin for Builtin
impl UnsafeUnpin for Builtin
impl UnwindSafe for Builtin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more