pub struct ThemeOverrideWatcher { /* private fields */ }Expand description
Per-shell-instance watcher over the process-wide override slot: each of the
three shells owns one, polling it once per frame (desktop: before rebuild in
RedrawRequested; mobile: at the top of the frame callback) to detect a
set_app_theme/clear_app_theme call since the last poll.
Implementations§
Source§impl ThemeOverrideWatcher
impl ThemeOverrideWatcher
Sourcepub fn poll(&mut self) -> Option<Option<Theme>>
pub fn poll(&mut self) -> Option<Option<Theme>>
Poll the slot once. Returns:
None— noset_app_theme/clear_app_themecall since the last poll (or since construction); the shell does nothing.Some(Some(theme))— a new forcedthemeto push to both delivery paths.Some(None)— the override was cleared; the shell should revert to its platform-derived default theme.
Trait Implementations§
Source§impl Debug for ThemeOverrideWatcher
impl Debug for ThemeOverrideWatcher
Auto Trait Implementations§
impl Freeze for ThemeOverrideWatcher
impl RefUnwindSafe for ThemeOverrideWatcher
impl Send for ThemeOverrideWatcher
impl Sync for ThemeOverrideWatcher
impl Unpin for ThemeOverrideWatcher
impl UnsafeUnpin for ThemeOverrideWatcher
impl UnwindSafe for ThemeOverrideWatcher
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.