/// Gets the names of each component in `component`'s tree that is
/// includable for the given `filter`.
Gets the names of each component in `component`'s tree that is
includable for the given `filter`.
Gets the names of each component in ` component ` ' s tree that is includable for the given ` filter ` .
fn filter_includable(component: &Component, filter: ListFilter) -> Vec<String> {
        fn filter_includable_recursive(
            component: &Component,
            filter: &ListFilter,
            names: &mut Vec<String>,
        ) {
            if component.should_include(&filter) {
                names.extend([component.name.clone()]);
            }
            for child in &component.children {
                filter_includable_recursive(&child, &filter, names);
            }
        }
        let mut names = Vec::<String>::new();
        filter_includable_recursive(&component, &filter, &mut names);
        names
    }
fn filter_includable ( component : & Component , filter : ListFilter ) -> Vec < String > { fn filter_includable_recursive ( component : & Component , filter : & ListFilter , names : & mut Vec < String > , ) { if component . should_include ( & filter ) { names . extend ( [ component . name . clone ( ) ] ) ; } for child in & component . children { filter_includable_recursive ( & child , & filter , names ) ; } } let mut names = Vec :: < String > :: new ( ) ; filter_includable_recursive ( & component , & filter , & mut names ) ; names }
Gets the names of each component in `component`'s tree that is
includable for the given `filter`.
Gets the names of each component in ` component ` ' s tree that is includable for the given ` filter ` .
component
&Component
filter
ListFilter