cosmic::iced_core::widget::tree

Function diff_children_custom_with_search

source
pub fn diff_children_custom_with_search<T>(
    current_children: &mut Vec<Tree>,
    new_children: &mut [T],
    diff: impl Fn(&mut Tree, &mut T),
    maybe_changed: impl Fn(usize) -> bool,
    new_state: impl Fn(&T) -> Tree,
)
Expand description

Reconciles the current_children with the provided list of widgets using custom logic both for diffing and creating new widget state.

The algorithm will try to minimize the impact of diffing by querying the maybe_changed closure.