-
Notifications
You must be signed in to change notification settings - Fork 34
Implement builder and accessor proc-macro for Consul types #63
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
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @x0rw Did you consider bon instead of a custom macro?
A little hesitant to ship a proc macro crate on top of the current one to crates.io
See https://bon-rs.com/guide/alternatives
Hey @kushudai |
Sounds great! |
Yeah, i compared it with |
@x0rw I merged a nit. I'm happy to merge this whenever you're ready. |
Hey @kushudai . Hey, I've been busy the past week, I really slept on this PR 😅 --- Let me do another manual review tomorrow and update the PR description, then we can get this merged 👍🏻. |
Thank you, no worries at all 😄 |
Hey @kushudai . |
What problem are we solving?
Currently to initiate a consul type you have to do
which is very repetitive, verbose and hurts the eye.
How are we solving the problem?
This PR introduces Bon that automatically generates idiomatic setters for all named fields in a struct.
And the client can do this:
Public Api
correspondant public api(reduced):
cargo public-api diff main..HEAD -sss
Checks
Please check these off before promoting the pull request to non-draft status.