Function taffy::compute_cached_layout

source ยท
pub fn compute_cached_layout<Tree: CacheTree + ?Sized, ComputeFunction>(
    tree: &mut Tree,
    node: NodeId,
    inputs: LayoutInput,
    compute_uncached: ComputeFunction,
) -> LayoutOutput
where ComputeFunction: FnMut(&mut Tree, NodeId, LayoutInput) -> LayoutOutput,
Expand description

Attempts to find a cached layout for the specified node and layout inputs.

Uses the provided closure to compute the layout (and then stores the result in the cache) if no cached layout is found.