Struct FrameWorkPlan

Source
pub struct FrameWorkPlan { /* private fields */ }
Expand description

Provider-neutral aggregate consumed by a presentation host.

Element identifiers and propagation roots deliberately do not cross this boundary. The runtime retains those details for incremental reconciliation and layout.

The fields are intentionally private: hosts can ask which frame stages are necessary but cannot infer or manipulate retained element roots.

§Examples

use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
let plan = FrameWorkPlan::from_invalidation(Invalidation::Layout);
assert!(!plan.needs_build());
assert!(plan.needs_layout() && plan.needs_paint());

Implementations§

Source§

impl FrameWorkPlan

Provides the operations defined for FrameWorkPlan.

Source

pub const fn none() -> Self

Returns a plan with no build, layout, or paint work.

This equals Default::default.

§Examples
use ailloli_ui_runtime::app::FrameWorkPlan;
assert_eq!(FrameWorkPlan::none(), FrameWorkPlan::default());
assert!(FrameWorkPlan::none().is_empty());
Source

pub const fn from_invalidation(invalidation: Invalidation) -> Self

Converts one invalidation strength into its implied frame stages.

Paint maps to paint only; layout maps to layout plus paint; build maps to all three stages.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
let plan = FrameWorkPlan::from_invalidation(Invalidation::Build);
assert!(plan.needs_build() && plan.needs_layout() && plan.needs_paint());
Source

pub const fn needs_build(self) -> bool

Returns whether component reconciliation/build work is required.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
assert!(FrameWorkPlan::from_invalidation(Invalidation::Build).needs_build());
assert!(!FrameWorkPlan::from_invalidation(Invalidation::Layout).needs_build());
Source

pub const fn needs_layout(self) -> bool

Returns whether retained layout work is required.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
assert!(FrameWorkPlan::from_invalidation(Invalidation::Layout).needs_layout());
assert!(!FrameWorkPlan::from_invalidation(Invalidation::Paint).needs_layout());
Source

pub const fn needs_paint(self) -> bool

Returns whether scene painting is required.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
assert!(FrameWorkPlan::from_invalidation(Invalidation::Paint).needs_paint());
assert!(!FrameWorkPlan::none().needs_paint());
Source

pub const fn is_empty(self) -> bool

Returns true exactly when painting is not required.

Public constructors preserve the invariant that build/layout imply paint, so this is equivalent to all stages being false.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
assert!(FrameWorkPlan::none().is_empty());
assert!(!FrameWorkPlan::from_invalidation(Invalidation::Paint).is_empty());
Source

pub const fn merge(self, other: Self) -> Self

Combines two plans by OR-ing each stage flag.

§Examples
use ailloli_ui_runtime::app::{FrameWorkPlan, Invalidation};
let plan = FrameWorkPlan::none().merge(FrameWorkPlan::from_invalidation(Invalidation::Layout));
assert!(!plan.needs_build());
assert!(plan.needs_layout() && plan.needs_paint());

Trait Implementations§

Source§

impl Clone for FrameWorkPlan

Source§

fn clone(&self) -> FrameWorkPlan

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameWorkPlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FrameWorkPlan

Source§

fn default() -> FrameWorkPlan

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FrameWorkPlan

Source§

fn eq(&self, other: &FrameWorkPlan) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FrameWorkPlan

Source§

impl Eq for FrameWorkPlan

Source§

impl StructuralPartialEq for FrameWorkPlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<A> IntoClickAction<A> for A
where A: Clone + 'static,

Source§

fn into_click_action(self) -> ClickAction<A>

Implements the into_click_action helper used by this module.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Brush for T
where T: Clone + PartialEq + Default + Debug,

§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Props for T
where T: Clone + 'static,