gix_traverse::tree

Function depthfirst

Source
pub fn depthfirst<StateMut, Find, V>(
    root: ObjectId,
    state: StateMut,
    objects: Find,
    delegate: &mut V,
) -> Result<(), Error>
where Find: Find, StateMut: BorrowMut<State>, V: Visit,
Expand description

A depth-first traversal of the root tree, that preserves the natural order of a tree while immediately descending into sub-trees.

state can be passed to re-use memory during multiple invocations.