danderson, Hmm, I wrote out a neat little iterator for the next step of this algorithm, which outputs a sequence of "go into child table" followed by a final "insert in this table" (enum with 2 vals).
But that breaks the borrow checker when used, because the final insert case moves a value, and rust reasonably goes "you can't do that because what if another loop iteration gets here?"
I don't think I can express the promise that it won't happen without unsafe... Is there some std wrapper type for this?