3 ms·
What makes you think you can't create and return an object? This is how every constructor function in rust works.
by ryeguy 11y ago
What makes you think you can't create and return an object? This is how every constructor function in rust works.
- shadowmint 11y agoI believe this is referring to '...and keep a mutable reference to it' ie. A singleton, and many overseer style observe-and-update-on-change data binding patterns. Basically, shared ownership is pretty central to many C++ patterns, which means they translate poorly into rust.