pub struct ThemeKey { /* private fields */ }Expand description
Compact 2-byte theme identifier pairing a DesignScheme and ThemeMode for zero-copy static LUT lookup.
Implementations§
Source§impl ThemeKey
Compact 2-byte theme key helpers resolving directly into THEME_TOKENS_LUT.
impl ThemeKey
Compact 2-byte theme key helpers resolving directly into THEME_TOKENS_LUT.
Sourcepub const fn new(scheme: DesignScheme, mode: ThemeMode) -> Self
pub const fn new(scheme: DesignScheme, mode: ThemeMode) -> Self
Sourcepub const fn from_tokens(tokens: &ThemeTokens) -> Self
pub const fn from_tokens(tokens: &ThemeTokens) -> Self
Sourcepub const fn from_lut_index(index: usize) -> Option<Self>
pub const fn from_lut_index(index: usize) -> Option<Self>
Sourcepub fn resolve_static(self) -> &'static ThemeTokens
pub fn resolve_static(self) -> &'static ThemeTokens
Sourcepub fn resolve(self) -> ThemeTokens
pub fn resolve(self) -> ThemeTokens
Source§impl ThemeKey
impl ThemeKey
pub fn get_scheme(&self) -> DesignScheme
pub fn get_mut_scheme(&mut self) -> &mut DesignScheme
pub fn set_scheme(&mut self, val: DesignScheme) -> &mut Self
pub fn get_mode(&self) -> ThemeMode
pub fn get_mut_mode(&mut self) -> &mut ThemeMode
pub fn set_mode(&mut self, val: ThemeMode) -> &mut Self
Trait Implementations§
impl Copy for ThemeKey
impl Eq for ThemeKey
Source§impl Ord for ThemeKey
impl Ord for ThemeKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ThemeKey
impl PartialOrd for ThemeKey
impl StructuralPartialEq for ThemeKey
Auto Trait Implementations§
impl Forget for ThemeKey
impl Freeze for ThemeKey
impl Move for ThemeKey
impl RefUnwindSafe for ThemeKey
impl Send for ThemeKey
impl Sync for ThemeKey
impl Unpin for ThemeKey
impl UnsafeUnpin for ThemeKey
impl UnwindSafe for ThemeKey
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