Skip to content
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

Add an option to extend collection-like fields (each-version) #199

Merged
merged 1 commit into from Mar 23, 2021

Conversation

andy128k
Copy link
Contributor

Closes #114
Closes #196

@andy128k
Copy link
Contributor Author

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

@TedDriggs
Copy link
Collaborator

This feels like the right API; thanks for taking the time to go through multiple iterations on it.

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

What happens if someone tries? Does the skip preempt the each, or does the each overrule the skip?

Copy link
Collaborator

@TedDriggs TedDriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes needed, but this is on track to be merged and go out as part of 0.10.0

derive_builder_core/src/setter.rs Outdated Show resolved Hide resolved
derive_builder_core/src/setter.rs Outdated Show resolved Hide resolved
derive_builder_core/src/setter.rs Outdated Show resolved Hide resolved
derive_builder_core/src/setter.rs Show resolved Hide resolved
@andy128k
Copy link
Contributor Author

This feels like the right API; thanks for taking the time to go through multiple iterations on it.

This implementation does not support things like #[builder(setter(skip = "true", each = "foo"))].

What happens if someone tries? Does the skip preempt the each, or does the each overrule the skip?

No setter is generated and each is ignored.

Copy link
Collaborator

@TedDriggs TedDriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See final question; otherwise this looks ready to merge

derive_builder/tests/setter_extend.rs Show resolved Hide resolved
@TedDriggs TedDriggs merged commit 7cde486 into colin-kiegel:master Mar 23, 2021
@andy128k andy128k deleted the issue_114_mandatory_name branch March 24, 2021 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Special setter behavior for Vec fields?
2 participants