How would you program something like this? Or, more generally, how do I separate some functionality of a struct into sub structs but operate on the common data of the parent struct (without passing references into every function)?
Self-referential structs aren't possible in safe Rust, because they don't make sense (or at the very least not useful). If a value is moved, then all references to it would be invalidated, including the ones inside itself.
They are also usually a code smell, an indication of a design error, and in the overwhelming majority of the cases, you don't really need a self-referential type. What are you trying to achieve at a higher level?
Yeah, I don't want it to be self-referential! I want a single struct to own all the data, but have the functionality be handled by different 'sub-structs'. Any alternative, more idiomatic design you can recommend would be splendid!
In this case, you would create one owning type without any lifetimes, and multiple non-owning types with a lifetime, used by a reference to the original, underlying, owned data. For example: