3 ms·
The problems lie both in the lack of field inheritance (something talked about in Rust as "virtual structs") and the difficulties with modeling a bi-directional
by the_duke 10y ago
The problems lie both in the lack of field inheritance (something talked about in Rust as "virtual structs") and the difficulties with modeling a bi-directional tree structure with the borrow checker.
- eridius 10y agoFor the bi-directional tree structure, it seems to me you could use Rc<Widget> for the children and rc::Weak<Widget> for the parent field.