pub struct ThemeId(/* private fields */);Expand description
Stable identity for a Theme, independent of its token values.
Two themes that share a ThemeId are “the same theme” even after a
token tweak, and two distinct themes are always distinguishable even
if they happen to share an appearance (Light/Dark). This is what lets
UI like ThemeSwitcher reliably match the active theme back to a list
entry, where appearance alone would be ambiguous.
Preset constructors stamp a family.variant id (e.g. "intui.light",
"fluent.dark"). OS-driven themes (follow-system / native) carry the
id "system". A theme built from raw tokens defaults to "custom".
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ThemeId
impl<'de> Deserialize<'de> for ThemeId
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 ThemeId
impl StructuralPartialEq for ThemeId
Auto Trait Implementations§
impl Freeze for ThemeId
impl RefUnwindSafe for ThemeId
impl Send for ThemeId
impl Sync for ThemeId
impl Unpin for ThemeId
impl UnsafeUnpin for ThemeId
impl UnwindSafe for ThemeId
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