I've not really used Rust, and I can certainly appreciate the goal of the language. However this code bothers me, and I can't really articulate why.
struct Node {
value: i32,
children: Vec<Rc<RefCell<Node>>>>,
parent: Option<Weak<RefCell<Node>>>>, // Weak breaks parent→child cycle
}
I understand its all boxes inside boxes inside boxes, but as an outsider it looks confusing mixing data type semantics with memory managment semantics.