Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is the next in a long line of refactors to try to model how the Rust generator handles ownership. The Rust generator has an `ownership` knob for deciding how to render types. The Rust generator additionally models ownership of resources/lists in params/results of imports/exports. Putting all of this together has led to many attempts to wrangle this in a form that's understandable but every time a bug comes up I feel like I don't understand what's going on. I've made another attempt in this commit. Here the goal is to centralize knowledge about types as much as possible. Instead of being spread out over a few methods everything is hopefully now centralized in a single type and a single "main method". All other little pieces stem from these two and are modeled to be relatively simple compared to the "main method". Whether or not this stands the test of time we'll see. This does change generated code in some situations as can be seen by the test that was updated. Nothing major should be changed, but a few more borrows are now required in places which probably should have been borrows before. More comments are found in the code about specific changes made here.
- Loading branch information