pub struct CodeEditorColors {
pub container: Option<ColorRole>,
pub gutter: Option<ColorRole>,
pub line_number: Option<ColorRole>,
pub current_line_number: Option<ColorRole>,
pub current_line: Option<ColorRole>,
}Expand description
The colours of an editor’s own parts, each a role of the theme.
A part that is not named keeps the colour the design system gives it, so an application can set the container and the gutter and leave the rest. Roles and never literals: the colours follow the theme from light to dark like every other colour here.
Fields§
§container: Option<ColorRole>What the text sits on.
gutter: Option<ColorRole>What the line numbers sit on.
line_number: Option<ColorRole>§current_line_number: Option<ColorRole>The number of the line the caret is on.
current_line: Option<ColorRole>The band behind the line the caret is on.
Implementations§
Source§impl CodeEditorColors
impl CodeEditorColors
pub const fn container(self, role: ColorRole) -> Self
pub const fn gutter(self, role: ColorRole) -> Self
pub const fn line_number(self, role: ColorRole) -> Self
pub const fn current_line_number(self, role: ColorRole) -> Self
pub const fn current_line(self, role: ColorRole) -> Self
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether every part is left to the design system, in which case there is nothing to send.
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
The record read back. None where the bytes are not one whole record or name a
role this side does not know, which is what the Renderer refuses too.
Trait Implementations§
Source§impl Clone for CodeEditorColors
impl Clone for CodeEditorColors
impl Copy for CodeEditorColors
Source§impl Debug for CodeEditorColors
impl Debug for CodeEditorColors
Source§impl Default for CodeEditorColors
impl Default for CodeEditorColors
impl Eq for CodeEditorColors
Source§impl PartialEq for CodeEditorColors
impl PartialEq for CodeEditorColors
impl StructuralPartialEq for CodeEditorColors
Auto Trait Implementations§
impl Forget for CodeEditorColors
impl Freeze for CodeEditorColors
impl Move for CodeEditorColors
impl RefUnwindSafe for CodeEditorColors
impl Send for CodeEditorColors
impl Sync for CodeEditorColors
impl Unpin for CodeEditorColors
impl UnsafeUnpin for CodeEditorColors
impl UnwindSafe for CodeEditorColors
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