6 ms·
I'll share an architectural pattern from Rust that is pretty ubiquitous but not really mentioned in the official books. Skip the whole weak rc nonsense and jum
by friedman23 4y ago
I'll share an architectural pattern from Rust that is pretty ubiquitous but not really mentioned in the official books.
Skip the whole weak rc nonsense and jump directly to using an allocator (like slotmap) when dealing with cyclic data structures. Wrap the allocator in a a struct to allow for easy access and all the difficulty from rust cyclic datastructures disappears.