-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More fine-grained field visibility #246
Comments
I'd be willing to implement such a (backward-compatible) change and create a pull request if that is desired. |
A pull request would be great, thanks for offering to take that on. Here's a breakdown of steps I'd suggest:
Steps 1-5 are done in #247; so documentation and tests are all that remain. |
TedDriggs
added a commit
that referenced
this issue
Apr 19, 2022
Fields, setters, build methods, and builder structs can now be marked as public, private, or have a restricted visibility with vis = "...". Fixes #246
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, first off: great project!
I am currently trying to integrate the builder with my tests, and therefore I'd need the fields exposed. After looking through the code, there seems to be
#[builder(field(public))]
to switch the field topub,
but not topub(crate)
orpub(super).
Is there another way to set the visibility, or is this currently the only way to do things?
I'd love a struct level
[builder(field(vis = "pub(super)"))]
or something similar. Even at a field level, this would be very helpful.The text was updated successfully, but these errors were encountered: