#[non_exhaustive]pub enum SystemTheme {
Light,
Dark,
}Expand description
The system’s light/dark color-scheme preference, as reported by the windowing/browser layer.
Currently just these two variants: 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. Marked
#[non_exhaustive] for consistency with sibling public enums, in case a
future source (e.g. a HighContrast case) needs to be added.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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