pub struct Highlighter { /* private fields */ }Expand description
Syntax highlighter that produces ratatui-compatible styled text.
Implementations§
Source§impl Highlighter
impl Highlighter
Sourcepub fn register_language(
&mut self,
language: Language,
) -> Result<(), HighlightError>
pub fn register_language( &mut self, language: Language, ) -> Result<(), HighlightError>
Register a language for highlighting.
Auto Trait Implementations§
impl Freeze for Highlighter
impl RefUnwindSafe for Highlighter
impl Send for Highlighter
impl Sync for Highlighter
impl Unpin for Highlighter
impl UnsafeUnpin for Highlighter
impl UnwindSafe for Highlighter
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
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