I've been working on a C++ game with a board and soldiers on it. My Player object has an array of pointers to his soldiers so that the player has quick access to his soldiers. The tricky thing is to sync them both to prevent issues.
How would you design something similar in Rust? I know there are raw pointers, but they are considered unsafe.
Is there a way to share an object between 2 classes so that one could read and one write? What about both read and write?