pub struct AppWake { /* private fields */ }Expand description
An app’s async-task waker: a WakeBridge::detachable_waker plus its bridge, re-targetable
to the runtime’s single bridge via Self::install. Every in-process app frontend
(ReactiveRuntimeApp, NvAppAdapter) polls its tasks with Self::waker, so a task woken
off-dispatch (a timer, a fetch) triggers the host’s frame request.
Implementations§
Source§impl AppWake
impl AppWake
pub fn new() -> Self
pub fn waker(&self) -> &Waker
pub fn bridge(&self) -> &Arc<WakeBridge> ⓘ
Sourcepub fn install(&mut self, bridge: Arc<WakeBridge>) -> bool
pub fn install(&mut self, bridge: Arc<WakeBridge>) -> bool
Re-targets the waker onto bridge (the previous waker clones go silent). Returns whether
a wake was pending on the previous bridge; callers trigger the new bridge for it after
releasing any surface write lock.
Trait Implementations§
Auto Trait Implementations§
impl Forget for AppWake
impl Freeze for AppWakewhere
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
*const (): Freeze,
&'static RawWakerVTable: Freeze,
*const ArcInner<WakeBridge> is !null: Freeze,
PhantomData<ArcInner<WakeBridge>>: Freeze,
impl Move for AppWake
impl RefUnwindSafe for AppWakewhere
Atomic<usize>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
RwLock<Option<Arc<dyn Fn() + Send + Sync>>>: RefUnwindSafe,
impl Send for AppWake
impl Sync for AppWake
impl Unpin for AppWake
impl UnsafeUnpin for AppWakewhere
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const (): UnsafeUnpin,
&'static RawWakerVTable: UnsafeUnpin,
*const ArcInner<WakeBridge> is !null: UnsafeUnpin,
PhantomData<ArcInner<WakeBridge>>: UnsafeUnpin,
impl UnwindSafe for AppWakewhere
Arc<Atomic<bool>>: UnwindSafe,
*const (): UnwindSafe,
&'static RawWakerVTable: UnwindSafe,
Arc<WakeBridge>: UnwindSafe,
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