Skip to main content

walk_modules

Function walk_modules 

Source
pub fn walk_modules<'a>(roots: &'a [Module]) -> impl Iterator<Item = &'a Module>
Expand description

Iterate over every module in roots and its descendants in depth-first pre-order: each module is yielded before its children, and children are yielded left-to-right.

Equivalent to the recursive collect_all_modules helper that every generator used to define locally.