How can I define two-way tree structure in Rust? [duplicate]
0
This question already has an answer here:
How do I express mutually recursive data structures in safe Rust?
3 answers
How to model complex recursive data structures (graphs)?
1 answer
I mean a tree where every node has multiple children and every child refers back to its parent. I've got this far: pub struct Post { content: String, links: Vec<Post>, parent: Box<Post>, } impl Post { pub fn new() -> Post { Post { content: String::new(), links: Vec::new(), parent: Box::new(......), } } } What do I put in the place...