Cyclic graphs are hard in Rust. A lovely post demonstrating how to use arenas in Rust to build mutable graphs whilst managing lifetimes correctly: https://exyr.org/2018/rust-arenas-vs-dropck/