#[non_exhaustive]pub enum Invalidation {
Paint,
Layout,
Build,
}Expand description
Smallest unit of retained UI work requested for an element.
The ordering is intentional: several requests for the same element are
coalesced to the strongest level (Paint < Layout < Build). Hosts only see
the aggregate FrameWorkPlan; exact element roots remain runtime-local.
The enum is non-exhaustive so downstream matches require a wildcard arm.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert!(Invalidation::Paint < Invalidation::Layout);
assert!(Invalidation::Layout < Invalidation::Build);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Paint
Repaint from already reconciled and laid-out retained state.
Layout
Recompute layout, then paint. Ancestors may be affected; siblings are not invalidated unless their own inputs or constraints change.
Build
Rebuild the owning component, then layout and paint its affected path.
Implementations§
Source§impl Invalidation
Provides the operations defined for Invalidation.
impl Invalidation
Provides the operations defined for Invalidation.
Sourcepub const fn rank(self) -> u8
pub const fn rank(self) -> u8
Returns the stable coalescing rank: paint 0, layout 1, build 2.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert_eq!(Invalidation::Paint.rank(), 0);
assert_eq!(Invalidation::Layout.rank(), 1);
assert_eq!(Invalidation::Build.rank(), 2);Sourcepub const fn merge(self, other: Self) -> Self
pub const fn merge(self, other: Self) -> Self
Coalesces two requests without losing the stronger unit of work.
The operation is commutative, associative, and idempotent for the current
variants; it returns whichever value has the greater Self::rank.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert_eq!(Invalidation::Paint.merge(Invalidation::Build), Invalidation::Build);
assert_eq!(Invalidation::Layout.merge(Invalidation::Paint), Invalidation::Layout);Sourcepub const fn needs_build(self) -> bool
pub const fn needs_build(self) -> bool
Returns true only for component-build invalidation.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert!(Invalidation::Build.needs_build());
assert!(!Invalidation::Layout.needs_build());Sourcepub const fn needs_layout(self) -> bool
pub const fn needs_layout(self) -> bool
Returns true for layout and build invalidations.
Build implies the layout pass that follows reconciliation.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert!(!Invalidation::Paint.needs_layout());
assert!(Invalidation::Layout.needs_layout());
assert!(Invalidation::Build.needs_layout());Sourcepub const fn needs_paint(self) -> bool
pub const fn needs_paint(self) -> bool
Returns true for every current invalidation strength.
Any retained-work request ultimately requires painting a presented frame.
§Examples
use ailloli_ui_runtime::app::Invalidation;
assert!(Invalidation::Paint.needs_paint());
assert!(Invalidation::Build.needs_paint());Trait Implementations§
Source§impl Clone for Invalidation
impl Clone for Invalidation
Source§fn clone(&self) -> Invalidation
fn clone(&self) -> Invalidation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Invalidation
impl Debug for Invalidation
Source§impl Hash for Invalidation
impl Hash for Invalidation
Source§impl Ord for Invalidation
Implements the Ord contract for Invalidation.
impl Ord for Invalidation
Implements the Ord contract for Invalidation.
Source§impl PartialEq for Invalidation
impl PartialEq for Invalidation
Source§impl PartialOrd for Invalidation
Implements the PartialOrd contract for Invalidation.
impl PartialOrd for Invalidation
Implements the PartialOrd contract for Invalidation.
impl Copy for Invalidation
impl Eq for Invalidation
impl StructuralPartialEq for Invalidation
Auto Trait Implementations§
impl Freeze for Invalidation
impl RefUnwindSafe for Invalidation
impl Send for Invalidation
impl Sync for Invalidation
impl Unpin for Invalidation
impl UnwindSafe for Invalidation
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.