When building #rustlang libraries, and you have result payloads (structs), is it more idiomatic to expose public struct fields or to create getter methods?
-
-
Random example from today: I had a public field that I was sure was going to be fine. I realized at the end of the day I needed interior mutability for it, so had to wrap it in a `Cell`. Updating all the callers was a pain (not a semver prob here but same deal)
-
Great example thanks.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.