pub fn tree_needs_layout(
applier: &mut (dyn Applier + 'static),
root: usize,
) -> Result<bool, NodeError>Expand description
Re-export the UI crate so applications can depend on a single crate. Check if a node or any of its descendants needs measure (selective measure optimization). This can be used by the app shell to skip layout when the tree is clean.
O(1) check - just looks at root’s dirty flag. Works because all mutation paths bubble dirty flags to root via composer commands.
Returns Result to force caller to handle errors explicitly. No more unwrap_or(true) safety net.