pub struct SyntaxHighlighter { /* private fields */ }Implementations§
Source§impl SyntaxHighlighter
impl SyntaxHighlighter
pub fn new(config: impl Into<CacheConfig>) -> SyntaxHighlighter
pub const fn stats(&self) -> HighlightStats
pub fn reset_stats(&mut self)
pub fn take_stats(&mut self) -> HighlightStats
pub const fn config(&self) -> CacheConfig
pub fn with_theme<'a>( &'a mut self, theme: &'a SyntaxTheme, ) -> ThemedHighlighter<'a>
pub fn cache_usage(&self) -> CacheUsage
pub fn clear_cache(&mut self)
Trait Implementations§
Source§impl Debug for SyntaxHighlighter
impl Debug for SyntaxHighlighter
Source§impl Default for SyntaxHighlighter
impl Default for SyntaxHighlighter
Source§fn default() -> SyntaxHighlighter
fn default() -> SyntaxHighlighter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SyntaxHighlighter
impl RefUnwindSafe for SyntaxHighlighter
impl Send for SyntaxHighlighter
impl Sync for SyntaxHighlighter
impl Unpin for SyntaxHighlighter
impl UnsafeUnpin 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
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