[][src]Function cmdtree::completion::tree_completions

pub fn tree_completions<'l: 'i, 'i, 'a: 'i, I>(
    line: &'l str,
    items: I
) -> impl Iterator<Item = (&'i str, &'i CompletionInfo<'a>)> where
    I: Iterator<Item = &'i CompletionInfo<'a>>, 

Determines from a set of items the ones that could be completed from the given line.

Effectively loops through each item and checks if it starts with line. items should be constructed by create_tree_completion_items.

The returned items are only the slice from the final word in line, such that hello wo would return world, and he would return hello world.