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>) -> ThemeDefinition
pub fn light() -> ThemeDefinition
pub fn dark() -> ThemeDefinition
pub fn system() -> ThemeDefinition
pub fn with_label(self, label: impl Into<String>) -> ThemeDefinition
pub fn label(self, label: impl Into<String>) -> ThemeDefinition
pub fn with_color_scheme( self, color_scheme: ThemeColorScheme, ) -> ThemeDefinition
pub fn scheme(self, color_scheme: ThemeColorScheme) -> ThemeDefinition
pub fn with_token( self, name: impl Into<String>, value: impl Into<String>, ) -> ThemeDefinition
pub fn token( self, name: impl Into<String>, value: impl Into<String>, ) -> ThemeDefinition
pub fn with_visual_token( self, role: ThemeVisualTokenRole, value: impl Into<String>, ) -> ThemeDefinition
pub fn visual( self, role: ThemeVisualTokenRole, value: impl Into<String>, ) -> ThemeDefinition
pub fn with_visual_tokens<I, V>(self, tokens: I) -> ThemeDefinition
pub fn visuals<I, V>(self, tokens: I) -> ThemeDefinition
pub fn with_tokens<I, K, V>(self, tokens: I) -> ThemeDefinition
pub fn tokens<I, K, V>(self, tokens: I) -> ThemeDefinition
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§fn add(
self,
rhs: ThemeDefinition,
) -> <ThemeConfig as Add<ThemeDefinition>>::Output
fn add( self, rhs: ThemeDefinition, ) -> <ThemeConfig as Add<ThemeDefinition>>::Output
Performs the
+ operation. Read moreSource§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§fn add(
self,
rhs: ThemeDefinition,
) -> <ThemeRegistry as Add<ThemeDefinition>>::Output
fn add( self, rhs: ThemeDefinition, ) -> <ThemeRegistry as Add<ThemeDefinition>>::Output
Performs the
+ operation. Read moreSource§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<ThemeDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeDefinition, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ThemeDefinition
Source§impl ThemeDefinitionDx for ThemeDefinition
impl ThemeDefinitionDx 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.