Generated Slint types live under this submodule so the consumer’s
slint-compiler can find them at slint_tree_view::tree_view::* (the
path advertised by rust_module("tree_view") in build.rs).
Find the index of the first item with the given internal-id, or
None. Hosts need this constantly when handling TreeView callbacks
(which report ids) against their own Vec<TreeItem>.
Same lookup against a Slint ModelRc<TreeItem> (what TreeView’s
get_model() returns). The linear walk is fine for typical trees
(≤ a few thousand items); for huge trees the host should maintain its
own HashMap<i32, usize> side index.