pub struct HighlightState<'a> { /* private fields */ }Expand description
State for streaming syntax highlighting.
This maintains the parse state across lines to correctly handle multi-line tokens like block comments and strings.
Implementations§
Source§impl<'a> HighlightState<'a>
impl<'a> HighlightState<'a>
Sourcepub fn new(syntax: &'a SyntaxReference, theme: &'a Theme) -> Self
pub fn new(syntax: &'a SyntaxReference, theme: &'a Theme) -> Self
Create a new highlight state for a syntax and theme.
Auto Trait Implementations§
impl<'a> Freeze for HighlightState<'a>
impl<'a> RefUnwindSafe for HighlightState<'a>
impl<'a> !Send for HighlightState<'a>
impl<'a> !Sync for HighlightState<'a>
impl<'a> Unpin for HighlightState<'a>
impl<'a> UnwindSafe for HighlightState<'a>
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