pub struct ThemeConfig {
pub primary_color: String,
pub secondary_color: String,
pub background_color: String,
pub text_color: String,
pub code_background: String,
pub code_text_color: String,
pub font_family: String,
pub code_font_family: String,
pub dark_mode: bool,
}Expand description
Theme configuration for output styling
Fields§
§primary_color: StringPrimary theme color
secondary_color: StringSecondary theme color
background_color: StringBackground color
text_color: StringText color
code_background: StringCode block background color
code_text_color: StringCode text color
font_family: StringFont family for regular text
code_font_family: StringFont family for code
dark_mode: boolEnable dark mode
Implementations§
Source§impl ThemeConfig
impl ThemeConfig
Sourcepub fn light_theme() -> Self
pub fn light_theme() -> Self
Create a new theme configuration with default light theme
Sourcepub fn dark_theme() -> Self
pub fn dark_theme() -> Self
Create a new theme configuration with default dark theme
Sourcepub fn to_css_variables(&self) -> String
pub fn to_css_variables(&self) -> String
Generate CSS variables for this theme
Trait Implementations§
Source§impl Clone for ThemeConfig
impl Clone for ThemeConfig
Source§fn clone(&self) -> ThemeConfig
fn clone(&self) -> ThemeConfig
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 ThemeConfig
impl Debug for ThemeConfig
Source§impl Default for ThemeConfig
impl Default for ThemeConfig
Source§impl<'de> Deserialize<'de> for ThemeConfig
impl<'de> Deserialize<'de> for ThemeConfig
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
Auto Trait Implementations§
impl Freeze for ThemeConfig
impl RefUnwindSafe for ThemeConfig
impl Send for ThemeConfig
impl Sync for ThemeConfig
impl Unpin for ThemeConfig
impl UnwindSafe for ThemeConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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