Hierarchical RefCell
s are difficult to iterate in the canonical ways because you have to maintain the entire chain of ownership in the form of Ref
s. Consider internal iteration. Or you can perhaps collect a Vec<Ref<_>>
first (but then you lose out on some of the benefits of iteration).
See this recentish thread and also this chapter of Too Many Linked Lists.