pub struct PendingWork {
pub loads: usize,
pub microtasks: bool,
pub layout_dirty: bool,
pub next_timer_ms: Option<f64>,
pub animation_frames: bool,
pub animations: bool,
}Expand description
One surface’s pending work, by source, at the moment of asking.
A snapshot, not a subscription: settling is level-triggered (ask again), so a harness loop is “apply step, ask until settled, assert” with no sleep in it.
Fields§
§loads: usizeIn-flight loads (document, subresources) on this surface.
microtasks: boolThe script engine’s job queue is non-empty (pump would report
Pending). false where the surface runs no script.
layout_dirty: boolLayout or paint work is scheduled but not yet performed.
next_timer_ms: Option<f64>Delay to the next scheduled timer, in ms, if any timer is scheduled. Reported, never blocking (see module docs).
animation_frames: boolAnimation-frame callbacks are requested for the next frame. Reported, never blocking: a rAF loop is indistinguishable from a one-shot.
animations: boolDeclared CSS transitions/animations are running. Reported, never blocking: they may be infinite.
Implementations§
Source§impl PendingWork
impl PendingWork
Sourcepub fn settled(&self) -> bool
pub fn settled(&self) -> bool
The default settle policy: every source that finishes by itself is done.
This is the harness’s “the step landed” signal — loads complete, script quiescent, layout clean. It deliberately ignores timers, rAF and declared animations; see the module docs for why each would turn a live surface into a hang.
Sourcepub fn fully_idle(&self) -> bool
pub fn fully_idle(&self) -> bool
Everything idle, the perpetual-capable sources included. Meaningful on a genuinely static surface; on anything animated this may simply never be true, which is the caller’s risk to accept.
Trait Implementations§
Source§impl Clone for PendingWork
impl Clone for PendingWork
Source§fn clone(&self) -> PendingWork
fn clone(&self) -> PendingWork
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PendingWork
Source§impl Debug for PendingWork
impl Debug for PendingWork
Source§impl Default for PendingWork
impl Default for PendingWork
Source§fn default() -> PendingWork
fn default() -> PendingWork
Source§impl<'de> Deserialize<'de> for PendingWork
impl<'de> Deserialize<'de> for PendingWork
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl MallocSizeOf for PendingWork
impl MallocSizeOf for PendingWork
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Source§impl PartialEq for PendingWork
impl PartialEq for PendingWork
Source§impl Serialize for PendingWork
impl Serialize for PendingWork
impl StructuralPartialEq for PendingWork
Auto Trait Implementations§
impl Freeze for PendingWork
impl RefUnwindSafe for PendingWork
impl Send for PendingWork
impl Sync for PendingWork
impl Unpin for PendingWork
impl UnsafeUnpin for PendingWork
impl UnwindSafe for PendingWork
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more