Enum style::matching::ChildRestyleRequirement
source · pub enum ChildRestyleRequirement {
CanSkipCascade = 0,
MustCascadeChildrenIfInheritResetStyle = 1,
MustCascadeChildren = 2,
MustCascadeDescendants = 3,
MustMatchDescendants = 4,
}
Expand description
Whether or not newly computed values for an element need to be cascaded to children (or children might need to be re-matched, e.g., for container queries).
Variants§
CanSkipCascade = 0
Old and new computed values were the same, or we otherwise know that we won’t bother recomputing style for children, so we can skip cascading the new values into child elements.
MustCascadeChildrenIfInheritResetStyle = 1
The same as MustCascadeChildren
, but we only need to actually
recascade if the child inherits any explicit reset style.
MustCascadeChildren = 2
Old and new computed values were different, so we must cascade the new values to children.
MustCascadeDescendants = 3
The same as MustCascadeChildren
, but for the entire subtree. This is
used to handle root font-size updates needing to recascade the whole
document.
MustMatchDescendants = 4
We need to re-match the whole subttree. This is used to handle container query relative unit changes for example. Container query size changes also trigger re-match, but after layout.
Trait Implementations§
source§impl Clone for ChildRestyleRequirement
impl Clone for ChildRestyleRequirement
source§fn clone(&self) -> ChildRestyleRequirement
fn clone(&self) -> ChildRestyleRequirement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChildRestyleRequirement
impl Debug for ChildRestyleRequirement
source§impl Ord for ChildRestyleRequirement
impl Ord for ChildRestyleRequirement
source§fn cmp(&self, other: &ChildRestyleRequirement) -> Ordering
fn cmp(&self, other: &ChildRestyleRequirement) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ChildRestyleRequirement
impl PartialEq for ChildRestyleRequirement
source§fn eq(&self, other: &ChildRestyleRequirement) -> bool
fn eq(&self, other: &ChildRestyleRequirement) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChildRestyleRequirement
impl PartialOrd for ChildRestyleRequirement
source§fn partial_cmp(&self, other: &ChildRestyleRequirement) -> Option<Ordering>
fn partial_cmp(&self, other: &ChildRestyleRequirement) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ChildRestyleRequirement
impl Eq for ChildRestyleRequirement
impl StructuralPartialEq for ChildRestyleRequirement
Auto Trait Implementations§
impl Freeze for ChildRestyleRequirement
impl RefUnwindSafe for ChildRestyleRequirement
impl Send for ChildRestyleRequirement
impl Sync for ChildRestyleRequirement
impl Unpin for ChildRestyleRequirement
impl UnwindSafe for ChildRestyleRequirement
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<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
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>
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