pub enum SystemTheme {
Light,
Dark,
}Expand description
The system’s light/dark color-scheme preference, as reported by the windowing/browser layer.
Deliberately just these two variants (not, say, a HighContrast or
Auto case): every source that can report this (winit’s Theme, the
browser’s prefers-color-scheme media query) only ever resolves to one
of exactly these two, and a backend that can’t determine a preference
simply never emits Event::ThemeChanged rather than emitting a third
“unknown” case for callers to handle.
Variants§
Trait Implementations§
Source§impl Clone for SystemTheme
impl Clone for SystemTheme
Source§fn clone(&self) -> SystemTheme
fn clone(&self) -> SystemTheme
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 moreimpl Copy for SystemTheme
Source§impl Debug for SystemTheme
impl Debug for SystemTheme
impl Eq for SystemTheme
Source§impl Hash for SystemTheme
impl Hash for SystemTheme
Source§impl PartialEq for SystemTheme
impl PartialEq for SystemTheme
impl StructuralPartialEq for SystemTheme
Auto Trait Implementations§
impl Freeze for SystemTheme
impl RefUnwindSafe for SystemTheme
impl Send for SystemTheme
impl Sync for SystemTheme
impl Unpin for SystemTheme
impl UnsafeUnpin for SystemTheme
impl UnwindSafe for SystemTheme
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