I have a struct A as a container,
struct A {
children: Vec<T>,
// other fields
},
a trait T,
trait T {
// some methods
}
and several implementations of T: B, C, etc.
struct B(_ref_to_A_);
impl T for B {}
I want that, B hold a reference to A while A have B in its children. So how can I change the definition of A and B to achieve my goal.