You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current RFC only describes fields in traits, but -- particularly if we supported shared-only fields (#5) -- it'd be nice to support inherent impls too. Then one could expose a convenient shared-only view of your fields:
pubstructFoo{context:Context}implFoo{publet context = self.context;// shared-only view, accessible by anyone}
Naturally we'd have to work out a few things: priority vis a vis regular fields, for example. In the example above, I'm assuming that we'd use the privacy of the regular field to determine its visibility (as we currently do for autoderef).
The current RFC only describes fields in traits, but -- particularly if we supported shared-only fields (#5) -- it'd be nice to support inherent impls too. Then one could expose a convenient shared-only view of your fields:
Naturally we'd have to work out a few things: priority vis a vis regular fields, for example. In the example above, I'm assuming that we'd use the privacy of the regular field to determine its visibility (as we currently do for autoderef).
Interactions
The text was updated successfully, but these errors were encountered: