pub struct ThemeDefinition {
pub id: String,
pub label: String,
pub color_scheme: ThemeColorScheme,
pub tokens: BTreeMap<String, String>,
}Fields§
§id: String§label: String§color_scheme: ThemeColorScheme§tokens: BTreeMap<String, String>Implementations§
Source§impl ThemeDefinition
impl ThemeDefinition
pub fn new(id: impl AsRef<str>, label: impl Into<String>) -> Self
pub fn light() -> Self
pub fn dark() -> Self
pub fn system() -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
pub fn with_color_scheme(self, color_scheme: ThemeColorScheme) -> Self
pub fn scheme(self, color_scheme: ThemeColorScheme) -> Self
pub fn with_token( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn token(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_visual_token( self, role: ThemeVisualTokenRole, value: impl Into<String>, ) -> Self
pub fn visual( self, role: ThemeVisualTokenRole, value: impl Into<String>, ) -> Self
pub fn with_visual_tokens<I, V>(self, tokens: I) -> Self
pub fn visuals<I, V>(self, tokens: I) -> Self
pub fn with_tokens<I, K, V>(self, tokens: I) -> Self
pub fn tokens<I, K, V>(self, tokens: I) -> Self
pub fn is_system(&self) -> bool
Trait Implementations§
Source§impl Add<ThemeDefinition> for ThemeConfig
impl Add<ThemeDefinition> for ThemeConfig
Source§type Output = ThemeConfig
type Output = ThemeConfig
The resulting type after applying the
+ operator.Source§impl Add<ThemeDefinition> for ThemeRegistry
impl Add<ThemeDefinition> for ThemeRegistry
Source§type Output = ThemeRegistry
type Output = ThemeRegistry
The resulting type after applying the
+ operator.Source§impl Clone for ThemeDefinition
impl Clone for ThemeDefinition
Source§fn clone(&self) -> ThemeDefinition
fn clone(&self) -> ThemeDefinition
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 ThemeDefinition
impl Debug for ThemeDefinition
Source§impl<'de> Deserialize<'de> for ThemeDefinition
impl<'de> Deserialize<'de> for ThemeDefinition
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 ThemeDefinition
Source§impl PartialEq for ThemeDefinition
impl PartialEq for ThemeDefinition
Source§fn eq(&self, other: &ThemeDefinition) -> bool
fn eq(&self, other: &ThemeDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ThemeDefinition
impl Serialize for ThemeDefinition
impl StructuralPartialEq for ThemeDefinition
Auto Trait Implementations§
impl Freeze for ThemeDefinition
impl RefUnwindSafe for ThemeDefinition
impl Send for ThemeDefinition
impl Sync for ThemeDefinition
impl Unpin for ThemeDefinition
impl UnsafeUnpin for ThemeDefinition
impl UnwindSafe for ThemeDefinition
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