Skip to main content

tree_apply_reorder

Function tree_apply_reorder 

Source
pub fn tree_apply_reorder<T: 'static>(
    tree: &TreeModel<T>,
    source: NodeId,
    target: NodeId,
    position: DropPosition,
) -> bool
Expand description

Apply a tree reorder by NodeId, with the cycle guard and the remove-then-insert index adjustment TreeModel::move_node requires. Shared by the TreeSlice / SortFilterTreeModel accept_drop impls. Returns whether the move was applied (false = rejected, e.g. cycle or self-drop).