Any time you need multiple mutable handles to the same data in Rust, you'll need an Rc<RefCell<T>> or something like it. (Playground example)
Arc<Mutex<T>> is the same thing but thread-friendly.
But avoid shared mutable state when you can. Some other way might be nicer—it really depends on what you're trying to do. For example, if the Parent has a Vec<Child> of children, and all you're trying to do is maintain some statistics in the Parent that are updated by some Child methods, then consider having the Parent pass &mut self.stats in to each child method that needs it. In that case you don't need any Arc/Rc/RefCell/Mutex anywhere, plus you save a little memory per Child.
To maintain both mutation and traversal capabilities for a graph, one effective approach is to delegate node ownership to a distinct collection.
For example, you can store nodes in a Vec<Node> and use integer indices within the Node struct to reference children and parents:
let my_graph = Vec::<Node>::new();
struct Node {
parent: usize, // Index into `my_graph`
children: Vec<usize>, // Indices into `my_graph`
}
You might also consider crates like Slab or SlotMap, which provide more concise and reusable ways to manage vector indices.
This approach has drawbacks, such as non-contiguous memory usage and the need to always access the node collection. However, it's highly flexible and, in many cases, performs at least as well as the self-owning Rc<RefCell<Node>> approach.