-
Notifications
You must be signed in to change notification settings - Fork 88
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
Support custom documentation for setters #13
Comments
This should be possible, Would you want to differentiate between comments for the struct field and comments for the setter? (If the field is not public, its docs wouldn't be rendered, so it might be cool to just add them to the setter fn.) |
Thanks for the quick response. |
@mre thank you very much for your feedback. :-) A simple solution would be to allow item doc-comments, but to skip over them and use auto-generated documentation for setters. Spontaneously that is what I would try first and then wait and see if there is a big need for something more sophisticated or magic. |
Ok, for now we have auto-generated doc-comments (95f3b4b) /// Set `$field_name`
///
/// auto-generated by [derive_builder](https://crates.io/crates/derive_builder) Skipping doc-comments (and I am open for future changes - but I think this is at least an improvement of the current state. I will release now without the pull request. ;-) |
implemented and published with v0.2.0 (Changelog) |
Consider this builder:
It would be great if there was a way to add the comments as documentation for the fields:
No clue if that is possible, though. 😄
The text was updated successfully, but these errors were encountered: