pub enum HighlightCategory {
Show 13 variants
Attribute,
Comment,
Constant,
Function,
Keyword,
Number,
Operator,
PunctuationBracket,
PunctuationDelimiter,
Property,
String,
Type,
Variable,
}Expand description
Highlight category names used for default languages.
Variants§
Attribute
Comment
Constant
Function
Keyword
Number
Operator
PunctuationBracket
PunctuationDelimiter
Property
String
Type
Variable
Implementations§
Source§impl HighlightCategory
impl HighlightCategory
Sourcepub fn from_default_index(index: usize) -> Option<Self>
pub fn from_default_index(index: usize) -> Option<Self>
Map a default language highlight index to a category
Sourcepub fn from_typescript_index(index: usize) -> Option<Self>
pub fn from_typescript_index(index: usize) -> Option<Self>
Map a TypeScript highlight index to a category.
Sourcepub fn theme_key(&self) -> &'static str
pub fn theme_key(&self) -> &'static str
Get the theme key path for this category (e.g., “syntax.keyword”).
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Get a human-readable display name for this category.
Trait Implementations§
Source§impl Clone for HighlightCategory
impl Clone for HighlightCategory
Source§fn clone(&self) -> HighlightCategory
fn clone(&self) -> HighlightCategory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HighlightCategory
impl Debug for HighlightCategory
Source§impl PartialEq for HighlightCategory
impl PartialEq for HighlightCategory
impl Copy for HighlightCategory
impl Eq for HighlightCategory
impl StructuralPartialEq for HighlightCategory
Auto Trait Implementations§
impl Freeze for HighlightCategory
impl RefUnwindSafe for HighlightCategory
impl Send for HighlightCategory
impl Sync for HighlightCategory
impl Unpin for HighlightCategory
impl UnsafeUnpin for HighlightCategory
impl UnwindSafe for HighlightCategory
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