Struct style::traversal_flags::TraversalFlags
source · pub struct TraversalFlags(<TraversalFlags as PublicFlags>::Internal);
Expand description
Flags that control the traversal process.
Tuple Fields§
§0: <TraversalFlags as PublicFlags>::Internal
Implementations§
source§impl TraversalFlags
impl TraversalFlags
sourcepub const AnimationOnly: Self = _
pub const AnimationOnly: Self = _
Traverse only elements for animation restyles.
sourcepub const ForCSSRuleChanges: Self = _
pub const ForCSSRuleChanges: Self = _
Traverse and update all elements with CSS animations since @keyframes rules may have changed. Triggered by CSS rule changes.
sourcepub const FinalAnimationTraversal: Self = _
pub const FinalAnimationTraversal: Self = _
The final animation-only traversal, which shouldn’t really care about other style changes anymore.
sourcepub const ParallelTraversal: Self = _
pub const ParallelTraversal: Self = _
Allows the traversal to run in parallel if there are sufficient cores on the machine.
sourcepub const FlushThrottledAnimations: Self = _
pub const FlushThrottledAnimations: Self = _
Flush throttled animations. By default, we only update throttled animations when we have other non-throttled work to do. With this flag, we unconditionally tick and process them.
source§impl TraversalFlags
impl TraversalFlags
sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl TraversalFlags
impl TraversalFlags
sourcepub const fn iter(&self) -> Iter<TraversalFlags>
pub const fn iter(&self) -> Iter<TraversalFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
sourcepub const fn iter_names(&self) -> IterNames<TraversalFlags>
pub const fn iter_names(&self) -> IterNames<TraversalFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
source§impl TraversalFlags
impl TraversalFlags
sourcepub fn for_animation_only(&self) -> bool
pub fn for_animation_only(&self) -> bool
Returns true if the traversal is for animation-only restyles.
Trait Implementations§
source§impl Binary for TraversalFlags
impl Binary for TraversalFlags
source§impl BitAnd for TraversalFlags
impl BitAnd for TraversalFlags
source§impl BitAndAssign for TraversalFlags
impl BitAndAssign for TraversalFlags
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOr for TraversalFlags
impl BitOr for TraversalFlags
source§fn bitor(self, other: TraversalFlags) -> Self
fn bitor(self, other: TraversalFlags) -> Self
The bitwise or (|
) of the bits in two flags values.
source§type Output = TraversalFlags
type Output = TraversalFlags
|
operator.source§impl BitOrAssign for TraversalFlags
impl BitOrAssign for TraversalFlags
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXor for TraversalFlags
impl BitXor for TraversalFlags
source§impl BitXorAssign for TraversalFlags
impl BitXorAssign for TraversalFlags
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Clone for TraversalFlags
impl Clone for TraversalFlags
source§fn clone(&self) -> TraversalFlags
fn clone(&self) -> TraversalFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TraversalFlags
impl Debug for TraversalFlags
source§impl Extend<TraversalFlags> for TraversalFlags
impl Extend<TraversalFlags> for TraversalFlags
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for TraversalFlags
impl Flags for TraversalFlags
source§const FLAGS: &'static [Flag<TraversalFlags>] = _
const FLAGS: &'static [Flag<TraversalFlags>] = _
source§fn from_bits_retain(bits: u32) -> TraversalFlags
fn from_bits_retain(bits: u32) -> TraversalFlags
source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moresource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moresource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<TraversalFlags> for TraversalFlags
impl FromIterator<TraversalFlags> for TraversalFlags
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
source§impl IntoIterator for TraversalFlags
impl IntoIterator for TraversalFlags
source§impl LowerHex for TraversalFlags
impl LowerHex for TraversalFlags
source§impl Not for TraversalFlags
impl Not for TraversalFlags
source§impl Octal for TraversalFlags
impl Octal for TraversalFlags
source§impl PartialEq for TraversalFlags
impl PartialEq for TraversalFlags
source§impl PublicFlags for TraversalFlags
impl PublicFlags for TraversalFlags
source§impl Sub for TraversalFlags
impl Sub for TraversalFlags
source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§type Output = TraversalFlags
type Output = TraversalFlags
-
operator.source§impl SubAssign for TraversalFlags
impl SubAssign for TraversalFlags
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§impl UpperHex for TraversalFlags
impl UpperHex for TraversalFlags
impl Copy for TraversalFlags
impl Eq for TraversalFlags
impl StructuralPartialEq for TraversalFlags
Auto Trait Implementations§
impl Freeze for TraversalFlags
impl RefUnwindSafe for TraversalFlags
impl Send for TraversalFlags
impl Sync for TraversalFlags
impl Unpin for TraversalFlags
impl UnwindSafe for TraversalFlags
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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