Struct ultron_core::TextHighlighter
source · pub struct TextHighlighter { /* private fields */ }
Implementations§
source§impl TextHighlighter
impl TextHighlighter
pub fn with_theme(theme_name: &str) -> TextHighlighter
pub fn set_syntax_token(&mut self, syntax_token: &str)
sourcepub fn select_theme(&mut self, theme_name: &str)
pub fn select_theme(&mut self, theme_name: &str)
set the theme name
pub fn highlight_line<'l>( &mut self, line: &'l str ) -> Result<Vec<(Style, &'l str), Global>, Error>
pub fn active_theme(&self) -> &'static Theme
pub fn gutter_background(&self) -> Option<Color>
pub fn gutter_foreground(&self) -> Option<Color>
pub fn theme_background(&self) -> Option<Color>
pub fn theme_foreground(&self) -> Option<Color>
pub fn selection_background(&self) -> Option<Color>
Trait Implementations§
source§impl Default for TextHighlighter
impl Default for TextHighlighter
source§fn default() -> TextHighlighter
fn default() -> TextHighlighter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TextHighlighter
impl Send for TextHighlighter
impl Sync for TextHighlighter
impl Unpin for TextHighlighter
impl UnwindSafe for TextHighlighter
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.