pub struct NamedTheme {
pub id: String,
pub name: String,
pub variants: ThemeVariants,
pub is_builtin: bool,
}Expand description
A complete theme with metadata.
Fields§
§id: StringUnique identifier (filename without extension)
name: StringDisplay name
variants: ThemeVariantsTheme color variants
is_builtin: boolWhether this is a built-in theme
Implementations§
Source§impl NamedTheme
impl NamedTheme
Sourcepub fn get_colors(&self, is_dark: bool) -> ThemeColors
pub fn get_colors(&self, is_dark: bool) -> ThemeColors
Get the appropriate colors for the current appearance mode.
Sourcepub fn variants_label(&self) -> &'static str
pub fn variants_label(&self) -> &'static str
Get a label describing available variants.
Trait Implementations§
Source§impl Clone for NamedTheme
impl Clone for NamedTheme
Source§fn clone(&self) -> NamedTheme
fn clone(&self) -> NamedTheme
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 moreAuto Trait Implementations§
impl Freeze for NamedTheme
impl RefUnwindSafe for NamedTheme
impl Send for NamedTheme
impl Sync for NamedTheme
impl Unpin for NamedTheme
impl UnwindSafe for NamedTheme
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