pub enum LifecycleState {
VisualUpdatePending,
InStyleRecalc,
StyleClean,
InLayout,
LayoutClean,
InPrePaint,
PrePaintClean,
InPaint,
PaintClean,
}Expand description
The current lifecycle state of a document.
Chrome: DocumentLifecycle::LifecycleState.
Variants§
VisualUpdatePending
Something visual changed — needs work.
InStyleRecalc
Style recalc is running.
StyleClean
Styles computed — ready for layout.
InLayout
Layout is running.
LayoutClean
Layout complete — ready for paint.
InPrePaint
Pre-paint (paint property trees) is running.
PrePaintClean
Pre-paint complete.
InPaint
Paint (display list generation) is running.
PaintClean
All phases complete — everything clean.
Implementations§
Source§impl LifecycleState
impl LifecycleState
Sourcepub fn is_layout_clean(self) -> bool
pub fn is_layout_clean(self) -> bool
Whether layout results are up-to-date.
Sourcepub fn is_paint_clean(self) -> bool
pub fn is_paint_clean(self) -> bool
Whether paint results are up-to-date.
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Mark that a visual update is needed (invalidate all phases).
Chrome: DocumentLifecycle::SetVisualUpdatePending().
Called when DOM changes, style changes, or viewport resizes.
Sourcepub fn needs_update(self) -> bool
pub fn needs_update(self) -> bool
Whether any work needs to be done.
Trait Implementations§
Source§impl Clone for LifecycleState
impl Clone for LifecycleState
Source§fn clone(&self) -> LifecycleState
fn clone(&self) -> LifecycleState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LifecycleState
impl Debug for LifecycleState
Source§impl Default for LifecycleState
impl Default for LifecycleState
Source§fn default() -> LifecycleState
fn default() -> LifecycleState
Returns the “default value” for a type. Read more
Source§impl Ord for LifecycleState
impl Ord for LifecycleState
Source§fn cmp(&self, other: &LifecycleState) -> Ordering
fn cmp(&self, other: &LifecycleState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LifecycleState
impl PartialEq for LifecycleState
Source§impl PartialOrd for LifecycleState
impl PartialOrd for LifecycleState
impl Copy for LifecycleState
impl Eq for LifecycleState
impl StructuralPartialEq for LifecycleState
Auto Trait Implementations§
impl Freeze for LifecycleState
impl RefUnwindSafe for LifecycleState
impl Send for LifecycleState
impl Sync for LifecycleState
impl Unpin for LifecycleState
impl UnsafeUnpin for LifecycleState
impl UnwindSafe for LifecycleState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert