pub struct Palette {
pub base: RunStyle,
pub keyword: Color,
pub string: Color,
pub number: Color,
pub comment: Color,
pub key: Color,
pub name: Color,
pub template: Color,
pub template_text: Color,
}Expand description
The colors a highlighter paints with. Every one is readable on a light and on a dark surface, which matters because the editor’s background is the platform’s and changes with the theme while the runs do not.
Fields§
§base: RunStyleThe style plain text takes: the font every run is set in (monospace by default) and the
color unclaimed text keeps (None = the platform’s label color).
keyword: Color§string: Color§number: Color§comment: Color§key: ColorAn object key, an attribute name, an argument name, a variable.
name: ColorAn element or type name.
template: ColorThe fill behind a template tag (${[ … ]}), and its text color.
template_text: ColorImplementations§
Trait Implementations§
impl StructuralPartialEq for Palette
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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