pub struct SyntaxColors {Show 41 fields
pub attribute: Option<ThemeStyle>,
pub boolean: Option<ThemeStyle>,
pub comment: Option<ThemeStyle>,
pub comment_doc: Option<ThemeStyle>,
pub constant: Option<ThemeStyle>,
pub constructor: Option<ThemeStyle>,
pub embedded: Option<ThemeStyle>,
pub emphasis: Option<ThemeStyle>,
pub emphasis_strong: Option<ThemeStyle>,
pub enum_: Option<ThemeStyle>,
pub function: Option<ThemeStyle>,
pub hint: Option<ThemeStyle>,
pub keyword: Option<ThemeStyle>,
pub label: Option<ThemeStyle>,
pub link_text: Option<ThemeStyle>,
pub link_uri: Option<ThemeStyle>,
pub number: Option<ThemeStyle>,
pub operator: Option<ThemeStyle>,
pub predictive: Option<ThemeStyle>,
pub preproc: Option<ThemeStyle>,
pub primary: Option<ThemeStyle>,
pub property: Option<ThemeStyle>,
pub punctuation: Option<ThemeStyle>,
pub punctuation_bracket: Option<ThemeStyle>,
pub punctuation_delimiter: Option<ThemeStyle>,
pub punctuation_list_marker: Option<ThemeStyle>,
pub punctuation_special: Option<ThemeStyle>,
pub string: Option<ThemeStyle>,
pub string_escape: Option<ThemeStyle>,
pub string_regex: Option<ThemeStyle>,
pub string_special: Option<ThemeStyle>,
pub string_special_symbol: Option<ThemeStyle>,
pub tag: Option<ThemeStyle>,
pub tag_doctype: Option<ThemeStyle>,
pub text_code_span: Option<ThemeStyle>,
pub text_literal: Option<ThemeStyle>,
pub title: Option<ThemeStyle>,
pub type_: Option<ThemeStyle>,
pub variable: Option<ThemeStyle>,
pub variable_special: Option<ThemeStyle>,
pub variant: Option<ThemeStyle>,
}Expand description
语法高亮主题中的语法颜色集合。
Fields§
§attribute: Option<ThemeStyle>§boolean: Option<ThemeStyle>§comment: Option<ThemeStyle>§comment_doc: Option<ThemeStyle>§constant: Option<ThemeStyle>§constructor: Option<ThemeStyle>§embedded: Option<ThemeStyle>§emphasis: Option<ThemeStyle>§emphasis_strong: Option<ThemeStyle>§enum_: Option<ThemeStyle>§function: Option<ThemeStyle>§hint: Option<ThemeStyle>§keyword: Option<ThemeStyle>§label: Option<ThemeStyle>§link_text: Option<ThemeStyle>§link_uri: Option<ThemeStyle>§number: Option<ThemeStyle>§operator: Option<ThemeStyle>§predictive: Option<ThemeStyle>§preproc: Option<ThemeStyle>§primary: Option<ThemeStyle>§property: Option<ThemeStyle>§punctuation: Option<ThemeStyle>§punctuation_bracket: Option<ThemeStyle>§punctuation_delimiter: Option<ThemeStyle>§punctuation_list_marker: Option<ThemeStyle>§punctuation_special: Option<ThemeStyle>§string: Option<ThemeStyle>§string_escape: Option<ThemeStyle>§string_regex: Option<ThemeStyle>§string_special: Option<ThemeStyle>§string_special_symbol: Option<ThemeStyle>§tag: Option<ThemeStyle>§tag_doctype: Option<ThemeStyle>§text_code_span: Option<ThemeStyle>§text_literal: Option<ThemeStyle>§title: Option<ThemeStyle>§type_: Option<ThemeStyle>§variable: Option<ThemeStyle>§variable_special: Option<ThemeStyle>§variant: Option<ThemeStyle>Implementations§
Source§impl SyntaxColors
impl SyntaxColors
Sourcepub fn style(&self, name: &str) -> Option<HighlightStyle>
pub fn style(&self, name: &str) -> Option<HighlightStyle>
按语法作用域名称查找高亮样式。
Sourcepub fn style_for_index(&self, index: usize) -> Option<HighlightStyle>
pub fn style_for_index(&self, index: usize) -> Option<HighlightStyle>
按查询捕获索引查找高亮样式。
Trait Implementations§
Source§impl Clone for SyntaxColors
impl Clone for SyntaxColors
Source§fn clone(&self) -> SyntaxColors
fn clone(&self) -> SyntaxColors
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SyntaxColors
impl Debug for SyntaxColors
Source§impl Default for SyntaxColors
impl Default for SyntaxColors
Source§fn default() -> SyntaxColors
fn default() -> SyntaxColors
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SyntaxColors
impl<'de> Deserialize<'de> for SyntaxColors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SyntaxColors
Source§impl Hash for SyntaxColors
impl Hash for SyntaxColors
Source§impl JsonSchema for SyntaxColors
impl JsonSchema for SyntaxColors
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SyntaxColors
impl PartialEq for SyntaxColors
Source§fn eq(&self, other: &SyntaxColors) -> bool
fn eq(&self, other: &SyntaxColors) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SyntaxColors
impl Serialize for SyntaxColors
impl StructuralPartialEq for SyntaxColors
Auto Trait Implementations§
impl Freeze for SyntaxColors
impl RefUnwindSafe for SyntaxColors
impl Send for SyntaxColors
impl Sync for SyntaxColors
impl Unpin for SyntaxColors
impl UnsafeUnpin for SyntaxColors
impl UnwindSafe for SyntaxColors
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().