-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: add support for setter prefix and suffix #94
Conversation
May I ask why? It is just more to type repeatedly :/ |
It is nice to have the option. For example I personally like to prefix my (manually implemented) builder methods with This is no breaking change and users don't have to set these values. If they are not set, the setter method is named like the field (current behavior). So really users can choose if they want to type more. |
I see your point, but I think that this is subjective and adds complexity to the code. The whole crate and all its builder attributes have the purpose to type less. I think that it is fine for a crate to be opionated to some degree. But let's see what @idanarye thinks about it. BTW: Always open an issue and wait for the response of the maintainers before starting with a PR. I was disappointed enough times by rejected PRs because they don't meet the goals of the maintainers :) |
While I myself don't see the point in using |
Please add a test with a keyword identifier for a field. Typed Builder had a problem with those in the past (#47), and I suspect this new feature (especially the prefix) may choke on it as well. |
Also, I'm not sure how I feel about the prefix and the postfix automatically adding the underscore. |
And please add an entry to the changelog. |
This PR adds support to add prefixes and suffixes to setter methods.