pub struct Highlighter { /* private fields */ }
Expand description
A syntax highlighter.
Trait Implementations§
Source§impl Debug for Highlighter
impl Debug for Highlighter
Source§impl Highlighter for Highlighter
impl Highlighter for Highlighter
Source§type Iterator<'a> = Box<dyn Iterator<Item = (Range<usize>, <Highlighter as Highlighter>::Highlight)> + 'a>
type Iterator<'a> = Box<dyn Iterator<Item = (Range<usize>, <Highlighter as Highlighter>::Highlight)> + 'a>
The highlight iterator type.
Source§fn new(settings: &Self::Settings) -> Self
fn new(settings: &Self::Settings) -> Self
Creates a new [
Highlighter
] from its [Self::Settings
].Source§fn update(&mut self, new_settings: &Self::Settings)
fn update(&mut self, new_settings: &Self::Settings)
Updates the [
Highlighter
] with some new [Self::Settings
].Source§fn change_line(&mut self, line: usize)
fn change_line(&mut self, line: usize)
Notifies the [
Highlighter
] that the line at the given index has changed.Source§fn highlight_line(&mut self, line: &str) -> Self::Iterator<'_>
fn highlight_line(&mut self, line: &str) -> Self::Iterator<'_>
Highlights the given line. Read more
Source§fn current_line(&self) -> usize
fn current_line(&self) -> usize
Returns the current line of the [
Highlighter
]. Read moreAuto Trait Implementations§
impl Freeze for Highlighter
impl RefUnwindSafe for Highlighter
impl !Send for Highlighter
impl !Sync for Highlighter
impl Unpin 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