pub struct SyntaxHighlighter { /* private fields */ }Implementations§
Source§impl SyntaxHighlighter
impl SyntaxHighlighter
pub fn new() -> Self
pub fn set_language(&mut self, language_id: LanguageId, theme: &SyntaxTheme)
Sourcepub fn invalidate_tree(&mut self)
pub fn invalidate_tree(&mut self)
Discard the cached parse tree, forcing a full re-parse next time.
Sourcepub fn parse(
&mut self,
rope: &Rope,
syntax_blocks: &mut SyntaxBlocks,
edit: Option<InputEdit>,
theme: &SyntaxTheme,
)
pub fn parse( &mut self, rope: &Rope, syntax_blocks: &mut SyntaxBlocks, edit: Option<InputEdit>, theme: &SyntaxTheme, )
Incrementally re-parse the rope and rebuild syntax blocks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyntaxHighlighter
impl RefUnwindSafe for SyntaxHighlighter
impl Send for SyntaxHighlighter
impl Sync for SyntaxHighlighter
impl Unpin for SyntaxHighlighter
impl UnwindSafe for SyntaxHighlighter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more