pub fn visit_item_tree<Base>(
base: Pin<&Base>,
item_tree: &ItemTreeRc,
item_tree_array: &[ItemTreeNode],
index: isize,
order: TraversalOrder,
visitor: VRefMut<'_, ItemVisitorVTable>,
visit_dynamic: impl Fn(Pin<&Base>, TraversalOrder, VRefMut<'_, ItemVisitorVTable>, u32) -> VisitChildrenResult,
) -> VisitChildrenResult
Expand description
Visit the children within an array of ItemTreeNode
The dynamic visitor is called for the dynamic nodes, its signature is
fn(base: &Base, visitor: vtable::VRefMut<ItemVisitorVTable>, dyn_index: usize)
FIXME: the design of this use lots of indirection and stack frame in recursive functions Need to check if the compiler is able to optimize away some of it. Possibly we should generate code that directly call the visitor instead