-
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
Custom struct definition #80
Comments
Maybe this should be a separate |
Hm, if we put the derive on the builder struct, I'd expect that most, if not all, attributes would require a different interpretation (e.g. |
Similar to @faern's comment here on #67, having to write the struct definition manually (and keep all fields and docs in sync) would lose a lot of the value of having the builder. That sort of setter generation could be done without proc macros. To me, the benefit of proc macros is not just LOC saved, it's time saved keeping names in sync, and time saved reading code because boilerplate isn't presented. |
I don't see this happening; closing the issue to maintain repo hygiene. |
derive_builder could skip the struct definition and leave that to the user. It would then only generate the setters.
Possible Use Cases
Limitations / Drawbacks
#[derive(...)] struct A
generate impls on astruct B
which is defined manuallyExample
The text was updated successfully, but these errors were encountered: