Function solve_layout
pub fn solve_layout(
taffy: &mut TaffyTree,
root: NodeId,
available: Size<AvailableSpace>,
) -> Result<(), TaffyError>Expand description
Solve the layout of the tree under root within available: what
TaffyTree::compute_layout does, for a widget or an app that lays a
panel out in a tree of its own.
Call this rather than the tree’s own method. That method is generic, so every app calling it compiled Taffy’s flexbox, grid and block solvers again (about 110 KB); this one is compiled once, into the toolkit.
§Errors
Returns the solver’s error when Taffy rejects the tree.