pub fn provide_prefix<I, F>(items: &[I], is_parent_of: F) -> Vec<String>
Expand description
Generate a list of prefix to display items as a tree (multi-root)
- the input should be sorted in the target display order
- the input order of ìtems is preserved into output
- the input order is used to ask for parent of item (parent should be before child)
- output as the same number of element than input
items
- output can be zipped with input ìtems
- is_parent_of(maybe_parent, item)