pub struct ThemeCapabilities {
pub system_detection: bool,
pub change_events: bool,
pub high_contrast_detection: bool,
}Expand description
Backend capability flags for system light/dark detection.
A backend that cannot observe the OS preference reports
ThemeCapabilities::none and returns None from
Backend::system_theme_mode, so apps can gate their follow-the-system
logic on real support instead of guessing.
Fields§
§system_detection: boolThe backend can report the OS light/dark preference through
Backend::system_theme_mode.
change_events: boolThe backend reports light/dark transitions through
crate::UiEvent::ThemeChanged as the OS preference changes.
high_contrast_detection: boolThe backend can detect the OS high-contrast accessibility mode.
Implementations§
Trait Implementations§
Source§impl Clone for ThemeCapabilities
impl Clone for ThemeCapabilities
impl Copy for ThemeCapabilities
Source§impl Debug for ThemeCapabilities
impl Debug for ThemeCapabilities
Source§impl Default for ThemeCapabilities
impl Default for ThemeCapabilities
impl Eq for ThemeCapabilities
Source§impl PartialEq for ThemeCapabilities
impl PartialEq for ThemeCapabilities
impl StructuralPartialEq for ThemeCapabilities
Auto Trait Implementations§
impl Forget for ThemeCapabilities
impl Freeze for ThemeCapabilities
impl Move for ThemeCapabilities
impl RefUnwindSafe for ThemeCapabilities
impl Send for ThemeCapabilities
impl Sync for ThemeCapabilities
impl Unpin for ThemeCapabilities
impl UnsafeUnpin for ThemeCapabilities
impl UnwindSafe for ThemeCapabilities
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