pub struct Runtime { /* private fields */ }Expand description
The internal reactive Runtime which stores all the reactive system states in a thread local.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn init_on_ui_thread()
pub fn init_on_ui_thread()
Call this once on the UI thread during initialization.
pub fn assert_ui_thread()
pub fn is_ui_thread() -> bool
Sourcepub fn drain_pending_work()
pub fn drain_pending_work()
Drain any queued work from the sync runtime and run pending UI effects.
Sourcepub fn has_pending_work() -> bool
pub fn has_pending_work() -> bool
Returns true if there is queued work for this runtime or the sync runtime.
Sourcepub fn set_sync_effect_waker(waker: impl Fn() + Send + Sync + 'static)
pub fn set_sync_effect_waker(waker: impl Fn() + Send + Sync + 'static)
Set a waker that will be called when a sync signal is updated off the UI thread. The waker should nudge the UI event loop (e.g., by sending a proxy event).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
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