pub struct StyleReasonFlags(/* private fields */);Implementations§
Source§impl StyleReasonFlags
impl StyleReasonFlags
Sourcepub const SELECTOR: Self
pub const SELECTOR: Self
The view has style selectors (:hover, :focus, :disabled, etc.) whose
matching result may have changed. Requires full resolve_nested_maps to re-run
since selector matching depends on interaction state.
Sourcepub const ANIMATION: Self
pub const ANIMATION: Self
One or more animations are actively running on this view. The animation stack
needs to be advanced and animate_into applied to the combined style. Implies
the view needs to be scheduled for the next frame via schedule_style.
Sourcepub const TRANSITION: Self
pub const TRANSITION: Self
A CSS-style property transition is in progress (e.g. background color, opacity).
The transition interpolator needs to be stepped and its output applied to the
view style props (view_style_props.read_explicit). Implies schedule_style.
Sourcepub const TARGET: Self
pub const TARGET: Self
One or more specific sub-element rectangles owned by this view need restyling,
identified by their ElementId. Used when a view owns multiple ElementIds
(e.g. a scroll view’s content area, vertical scrollbar, horizontal scrollbar)
and only a subset need to be updated. The targets vec carries each affected
ElementId and the StyleReasonSet describing why that specific element is dirty,
allowing style_pass to dispatch targeted updates rather than fully restyling
the entire view.
Sourcepub const STYLE_PASS: Self
pub const STYLE_PASS: Self
Request that the style_pass be run again.
Sourcepub const VIEW_STYLE: Self
pub const VIEW_STYLE: Self
Request that the view_style method from the View trait be run again.
Sourcepub const VISIBILITY: Self
pub const VISIBILITY: Self
Request that the style_pass be run again
Sourcepub const INHERITED_CHANGE: Self
pub const INHERITED_CHANGE: Self
Parent’s inherited scalar properties changed (font size, color, etc.). Child must recompute computed_style but may skip resolve_nested_maps if it has no selectors and its own style stack is clean.
Sourcepub const CLASS_CONTEXT_CHANGE: Self
pub const CLASS_CONTEXT_CHANGE: Self
Parent’s class context map changed (new class definitions visible to children). Child must re-run resolve_nested_maps to pick up new class rules, but inherited scalar props are unchanged so with_context values are stable.
Source§impl StyleReasonFlags
impl StyleReasonFlags
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 StyleReasonFlags
impl StyleReasonFlags
Sourcepub const fn iter(&self) -> Iter<StyleReasonFlags> ⓘ
pub const fn iter(&self) -> Iter<StyleReasonFlags> ⓘ
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<StyleReasonFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<StyleReasonFlags> ⓘ
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.
Trait Implementations§
Source§impl Binary for StyleReasonFlags
impl Binary for StyleReasonFlags
Source§impl BitAnd for StyleReasonFlags
impl BitAnd for StyleReasonFlags
Source§impl BitAndAssign for StyleReasonFlags
impl BitAndAssign for StyleReasonFlags
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 StyleReasonFlags
impl BitOr for StyleReasonFlags
Source§fn bitor(self, other: StyleReasonFlags) -> Self
fn bitor(self, other: StyleReasonFlags) -> Self
The bitwise or (|) of the bits in two flags values.
Source§type Output = StyleReasonFlags
type Output = StyleReasonFlags
| operator.Source§impl BitOrAssign for StyleReasonFlags
impl BitOrAssign for StyleReasonFlags
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 StyleReasonFlags
impl BitXor for StyleReasonFlags
Source§impl BitXorAssign for StyleReasonFlags
impl BitXorAssign for StyleReasonFlags
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 StyleReasonFlags
impl Clone for StyleReasonFlags
impl Copy for StyleReasonFlags
Source§impl Debug for StyleReasonFlags
impl Debug for StyleReasonFlags
impl Eq for StyleReasonFlags
Source§impl Extend<StyleReasonFlags> for StyleReasonFlags
impl Extend<StyleReasonFlags> for StyleReasonFlags
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: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for StyleReasonFlags
impl Flags for StyleReasonFlags
Source§const FLAGS: &'static [Flag<StyleReasonFlags>]
const FLAGS: &'static [Flag<StyleReasonFlags>]
Source§fn from_bits_retain(bits: u32) -> StyleReasonFlags
fn from_bits_retain(bits: u32) -> StyleReasonFlags
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS].§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§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.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read more§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.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Source§impl FromIterator<StyleReasonFlags> for StyleReasonFlags
impl FromIterator<StyleReasonFlags> for StyleReasonFlags
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 StyleReasonFlags
impl IntoIterator for StyleReasonFlags
Source§impl LowerHex for StyleReasonFlags
impl LowerHex for StyleReasonFlags
Source§impl Not for StyleReasonFlags
impl Not for StyleReasonFlags
Source§impl Octal for StyleReasonFlags
impl Octal for StyleReasonFlags
Source§impl PartialEq for StyleReasonFlags
impl PartialEq for StyleReasonFlags
Source§impl PublicFlags for StyleReasonFlags
impl PublicFlags for StyleReasonFlags
impl StructuralPartialEq for StyleReasonFlags
Source§impl Sub for StyleReasonFlags
impl Sub for StyleReasonFlags
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 = StyleReasonFlags
type Output = StyleReasonFlags
- operator.Source§impl SubAssign for StyleReasonFlags
impl SubAssign for StyleReasonFlags
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.
Auto Trait Implementations§
impl Freeze for StyleReasonFlags
impl RefUnwindSafe for StyleReasonFlags
impl Send for StyleReasonFlags
impl Sync for StyleReasonFlags
impl Unpin for StyleReasonFlags
impl UnsafeUnpin for StyleReasonFlags
impl UnwindSafe for StyleReasonFlags
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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