pub enum DirtyFlag {
None,
Paint,
Layout,
}Expand description
Represents the invalidation state of a layout node.
The states are ordered by severity, allowing for easy “upgrading” of the dirty state.
A node marked for Layout does not also need to be marked for Paint.
Because this enum derives PartialOrd and Ord, you can directly compare variants:
DirtyFlag::Layout > DirtyFlag::PaintistrueDirtyFlag::Paint >= DirtyFlag::NoneistrueDirtyFlag::Paint < DirtyFlag::Layoutistrue
Variants§
None
The node’s layout is valid and no repaint is needed. This is the “clean” state.
Paint
The node’s geometry is valid, but its appearance (e.g., color) has changed. Requires a display list update only.
Layout
The node’s geometry (size or position) is invalid. Requires a full layout pass and a display list update.
Trait Implementations§
Source§impl Ord for DirtyFlag
impl Ord for DirtyFlag
Source§impl PartialOrd for DirtyFlag
impl PartialOrd for DirtyFlag
impl Copy for DirtyFlag
impl Eq for DirtyFlag
impl StructuralPartialEq for DirtyFlag
Auto Trait Implementations§
impl Freeze for DirtyFlag
impl RefUnwindSafe for DirtyFlag
impl Send for DirtyFlag
impl Sync for DirtyFlag
impl Unpin for DirtyFlag
impl UnwindSafe for DirtyFlag
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§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 more