-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Stabilize #[builder(getter)]
#225
Comments
@angelorendina you mentioned in #149 (comment) that you got Did you implement custom parsing of |
@Veetaha in my implementation attempt, I simply used |
Yeah, Just a headsup, I have a draft PR, that I'm currently working on for |
I'm revisiting the getters design for #[derive(bon::Builder)]
struct Command {
#[builder(start_fn)]
args: Vec<String>,
}
impl<S: command_builder::State> CommandBuilder<S> {
fn arg(mut self, arg: String) -> Self {
self.args.push(arg);
self
}
} The dilemma here is in the naming of the builder's field for the method's
Maybe the name has to be explicitly configured via |
This is a tracking issue for the
#[builder(getter)]
attribute feature. The stabilization of the design for this attribute requires some more feedback from the community.If you think the current design is already solid and covers your current or potential future use cases, then just leave a 👍 reaction.
If you'd like to change something about the
#[builder(getter)]
attribute syntax and behavior or just extend it, then feel free to leave a comment. We'd be glad to hear your ideas!Design Vision
Part of the following behaviors are already implemented, but not all.
Initial discussion on this attribute: #221
Checklist
&T
#[builder(start_fn)]
members#[builder(field)]
membersself
receiver of methodscopy
and by-clone
gettersderef(...)
configmut
getterswith
closure and shortgetter = closure
syntax)A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.
The text was updated successfully, but these errors were encountered: